macro_rules! magic_number {
    ($name:ident, $value:expr) => {
        const $name: u32 = $value;
    };
}
magic_number!(KEYC_BUILD_MODIFIERS, 0x10000000);
magic_number!(KEYC_VI, 0x20000000);
magic_number!(KEYC_SENT, 0x40000000);
magic_number!(CLIENT_ACTIVEPANE, 0x80000000);

extern "C" {
    pub type event_base;
    pub type evbuffer;
    pub type bufferevent_ops;
    pub type args;
    pub type tmuxpeer;
    pub type hyperlinks;
    pub type screen_write_cline;
    pub type screen_sel;
    pub type screen_titles;
    pub type environ;
    pub type options;
    pub type format_tree;
    pub type input_ctx;
    pub type cmds;
    pub type tty_code;
    pub type format_job_tree;
    pub type control_state;
    pub type cmdq_list;
    pub type options_array_item;
    pub type options_entry;
    fn __ctype_b_loc() -> *mut *const u16;
    fn sscanf(_: *const i8, _: *const i8, _: ...) -> i32;
    fn __b64_pton(_: *const i8, _: *mut u8, _: size_t) -> i32;
    fn strtoul(_: *const i8, _: *mut *mut i8, _: i32) -> u64;
    fn free(_: *mut ());
    fn memcpy(_: *mut (), _: *const (), _: u64) -> *mut ();
    fn strncmp(_: *const i8, _: *const i8, _: u64) -> i32;
    fn strcspn(_: *const i8, _: *const i8) -> u64;
    fn strlen(_: *const i8) -> u64;
    fn strsep(__stringp: *mut *mut i8, __delim: *const i8) -> *mut i8;
    fn event_add(ev: *mut event, timeout: *const timeval) -> i32;
    fn event_del(_: *mut event) -> i32;
    fn event_pending(ev: *const event, events: i16, tv: *mut timeval) -> i32;
    fn event_initialized(ev: *const event) -> i32;
    fn event_set(
        _: *mut event,
        _: i32,
        _: i16,
        _: Option<unsafe extern "C" fn(i32, i16, *mut ()) -> ()>,
        _: *mut (),
    );
    fn evbuffer_get_length(buf: *const evbuffer) -> size_t;
    fn evbuffer_drain(buf: *mut evbuffer, len: size_t) -> i32;
    fn evbuffer_pullup(buf: *mut evbuffer, size: ssize_t) -> *mut u8;
    fn strlcpy(_: *mut i8, _: *const i8, _: size_t) -> size_t;
    fn xmalloc(_: size_t) -> *mut ();
    fn xcalloc(_: size_t, _: size_t) -> *mut ();
    fn xstrdup(_: *const i8) -> *mut i8;
    static mut global_options: *mut options;
    fn paste_add(_: *const i8, _: *mut i8, _: size_t);
    fn notify_client(_: *const i8, _: *mut client);
    fn options_get(_: *mut options, _: *const i8) -> *mut options_entry;
    fn options_array_first(_: *mut options_entry) -> *mut options_array_item;
    fn options_array_next(_: *mut options_array_item) -> *mut options_array_item;
    fn options_array_item_index(_: *mut options_array_item) -> u_int;
    fn options_array_item_value(_: *mut options_array_item) -> *mut options_value;
    fn options_get_number(_: *mut options, _: *const i8) -> i64;
    fn tty_set_size(_: *mut tty, _: u_int, _: u_int, _: u_int, _: u_int);
    fn tty_invalidate(_: *mut tty);
    fn tty_update_features(_: *mut tty);
    fn tty_term_string(_: *mut tty_term, _: tty_code_code) -> *const i8;
    fn tty_add_features(_: *mut i32, _: *const i8, _: *const i8);
    fn tty_default_features(_: *mut i32, _: *const i8, _: u_int);
    fn key_string_lookup_key(_: key_code, _: i32) -> *const i8;
    fn server_client_handle_key(_: *mut client, _: *mut key_event) -> i32;
    fn colour_tostring(_: i32) -> *const i8;
    fn colour_parseX11(_: *const i8) -> i32;
    fn input_reply_clipboard(_: *mut bufferevent, _: *const i8, _: size_t, _: *const i8);
    fn window_pane_find_by_id(_: u_int) -> *mut window_pane;
    fn window_update_focus(_: *mut window);
    fn utf8_fromwc(wc: wchar_t, _: *mut utf8_data) -> utf8_state;
    fn utf8_open(_: *mut utf8_data, _: u_char) -> utf8_state;
    fn utf8_append(_: *mut utf8_data, _: u_char) -> utf8_state;
    fn utf8_from_data(_: *const utf8_data, _: *mut utf8_char) -> utf8_state;
    fn log_debug(_: *const i8, _: ...);
    fn log_get_level() -> i32;
}
pub type __u_char = u8;
pub type __u_short = u16;
pub type __u_int = u32;
pub type __uint8_t = u8;
pub type __uint64_t = u64;
pub type __pid_t = i32;
pub type __time_t = i64;
pub type __suseconds_t = i64;
pub type __ssize_t = i64;
pub type u_char = __u_char;
pub type u_short = __u_short;
pub type u_int = __u_int;
pub type pid_t = __pid_t;
pub type ssize_t = __ssize_t;
pub type time_t = __time_t;
pub type size_t = u64;
#[derive(Copy, Clone)]
#[repr(C)]
pub struct timeval {
    pub tv_sec: __time_t,
    pub tv_usec: __suseconds_t,
}
pub type uint8_t = __uint8_t;
pub type uint64_t = __uint64_t;
pub type C2RustUnnamed = u32;
pub const _ISalnum: C2RustUnnamed = 8;
pub const _ISpunct: C2RustUnnamed = 4;
pub const _IScntrl: C2RustUnnamed = 2;
pub const _ISblank: C2RustUnnamed = 1;
pub const _ISgraph: C2RustUnnamed = 32768;
pub const _ISprint: C2RustUnnamed = 16384;
pub const _ISspace: C2RustUnnamed = 8192;
pub const _ISxdigit: C2RustUnnamed = 4096;
pub const _ISdigit: C2RustUnnamed = 2048;
pub const _ISalpha: C2RustUnnamed = 1024;
pub const _ISlower: C2RustUnnamed = 512;
pub const _ISupper: C2RustUnnamed = 256;
pub type wchar_t = i32;
pub type cc_t = u8;
pub type speed_t = u32;
pub type tcflag_t = u32;
#[derive(Copy, Clone)]
#[repr(C)]
pub struct termios {
    pub c_iflag: tcflag_t,
    pub c_oflag: tcflag_t,
    pub c_cflag: tcflag_t,
    pub c_lflag: tcflag_t,
    pub c_line: cc_t,
    pub c_cc: [cc_t; 32],
    pub c_ispeed: speed_t,
    pub c_ospeed: speed_t,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct event {
    pub ev_evcallback: event_callback,
    pub ev_timeout_pos: C2RustUnnamed_5,
    pub ev_fd: i32,
    pub ev_base: *mut event_base,
    pub ev_: C2RustUnnamed_0,
    pub ev_events: i16,
    pub ev_res: i16,
    pub ev_timeout: timeval,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub union C2RustUnnamed_0 {
    pub ev_io: C2RustUnnamed_3,
    pub ev_signal: C2RustUnnamed_1,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct C2RustUnnamed_1 {
    pub ev_signal_next: C2RustUnnamed_2,
    pub ev_ncalls: i16,
    pub ev_pncalls: *mut i16,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct C2RustUnnamed_2 {
    pub le_next: *mut event,
    pub le_prev: *mut *mut event,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct C2RustUnnamed_3 {
    pub ev_io_next: C2RustUnnamed_4,
    pub ev_timeout: timeval,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct C2RustUnnamed_4 {
    pub le_next: *mut event,
    pub le_prev: *mut *mut event,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub union C2RustUnnamed_5 {
    pub ev_next_with_common_timeout: C2RustUnnamed_6,
    pub min_heap_idx: i32,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct C2RustUnnamed_6 {
    pub tqe_next: *mut event,
    pub tqe_prev: *mut *mut event,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct event_callback {
    pub evcb_active_next: C2RustUnnamed_8,
    pub evcb_flags: i16,
    pub evcb_pri: uint8_t,
    pub evcb_closure: uint8_t,
    pub evcb_cb_union: C2RustUnnamed_7,
    pub evcb_arg: *mut (),
}
#[derive(Copy, Clone)]
#[repr(C)]
pub union C2RustUnnamed_7 {
    pub evcb_callback: Option<unsafe extern "C" fn(i32, i16, *mut ()) -> ()>,
    pub evcb_selfcb: Option<unsafe extern "C" fn(*mut event_callback, *mut ()) -> ()>,
    pub evcb_evfinalize: Option<unsafe extern "C" fn(*mut event, *mut ()) -> ()>,
    pub evcb_cbfinalize: Option<unsafe extern "C" fn(*mut event_callback, *mut ()) -> ()>,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct C2RustUnnamed_8 {
    pub tqe_next: *mut event_callback,
    pub tqe_prev: *mut *mut event_callback,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct bufferevent {
    pub ev_base: *mut event_base,
    pub be_ops: *const bufferevent_ops,
    pub ev_read: event,
    pub ev_write: event,
    pub input: *mut evbuffer,
    pub output: *mut evbuffer,
    pub wm_read: event_watermark,
    pub wm_write: event_watermark,
    pub readcb: bufferevent_data_cb,
    pub writecb: bufferevent_data_cb,
    pub errorcb: bufferevent_event_cb,
    pub cbarg: *mut (),
    pub timeout_read: timeval,
    pub timeout_write: timeval,
    pub enabled: i16,
}
pub type bufferevent_event_cb =
    Option<unsafe extern "C" fn(*mut bufferevent, i16, *mut ()) -> ()>;
pub type bufferevent_data_cb =
    Option<unsafe extern "C" fn(*mut bufferevent, *mut ()) -> ()>;
#[derive(Copy, Clone)]
#[repr(C)]
pub struct event_watermark {
    pub low: size_t,
    pub high: size_t,
}
pub type bitstr_t = u8;
pub type msgtype = u32;
pub const MSG_READ_CANCEL: msgtype = 307;
pub const MSG_WRITE_CLOSE: msgtype = 306;
pub const MSG_WRITE_READY: msgtype = 305;
pub const MSG_WRITE: msgtype = 304;
pub const MSG_WRITE_OPEN: msgtype = 303;
pub const MSG_READ_DONE: msgtype = 302;
pub const MSG_READ: msgtype = 301;
pub const MSG_READ_OPEN: msgtype = 300;
pub const MSG_FLAGS: msgtype = 218;
pub const MSG_EXEC: msgtype = 217;
pub const MSG_WAKEUP: msgtype = 216;
pub const MSG_UNLOCK: msgtype = 215;
pub const MSG_SUSPEND: msgtype = 214;
pub const MSG_OLDSTDOUT: msgtype = 213;
pub const MSG_OLDSTDIN: msgtype = 212;
pub const MSG_OLDSTDERR: msgtype = 211;
pub const MSG_SHUTDOWN: msgtype = 210;
pub const MSG_SHELL: msgtype = 209;
pub const MSG_RESIZE: msgtype = 208;
pub const MSG_READY: msgtype = 207;
pub const MSG_LOCK: msgtype = 206;
pub const MSG_EXITING: msgtype = 205;
pub const MSG_EXITED: msgtype = 204;
pub const MSG_EXIT: msgtype = 203;
pub const MSG_DETACHKILL: msgtype = 202;
pub const MSG_DETACH: msgtype = 201;
pub const MSG_COMMAND: msgtype = 200;
pub const MSG_IDENTIFY_TERMINFO: msgtype = 112;
pub const MSG_IDENTIFY_LONGFLAGS: msgtype = 111;
pub const MSG_IDENTIFY_STDOUT: msgtype = 110;
pub const MSG_IDENTIFY_FEATURES: msgtype = 109;
pub const MSG_IDENTIFY_CWD: msgtype = 108;
pub const MSG_IDENTIFY_CLIENTPID: msgtype = 107;
pub const MSG_IDENTIFY_DONE: msgtype = 106;
pub const MSG_IDENTIFY_ENVIRON: msgtype = 105;
pub const MSG_IDENTIFY_STDIN: msgtype = 104;
pub const MSG_IDENTIFY_OLDCWD: msgtype = 103;
pub const MSG_IDENTIFY_TTYNAME: msgtype = 102;
pub const MSG_IDENTIFY_TERM: msgtype = 101;
pub const MSG_IDENTIFY_FLAGS: msgtype = 100;
pub const MSG_VERSION: msgtype = 12;
#[derive(Copy, Clone)]
#[repr(C)]
pub struct client {
    pub name: *const i8,
    pub peer: *mut tmuxpeer,
    pub queue: *mut cmdq_list,
    pub windows: client_windows,
    pub control_state: *mut control_state,
    pub pause_age: u_int,
    pub pid: pid_t,
    pub fd: i32,
    pub out_fd: i32,
    pub event: event,
    pub retval: i32,
    pub creation_time: timeval,
    pub activity_time: timeval,
    pub last_activity_time: timeval,
    pub environ: *mut environ,
    pub jobs: *mut format_job_tree,
    pub title: *mut i8,
    pub path: *mut i8,
    pub cwd: *const i8,
    pub term_name: *mut i8,
    pub term_features: i32,
    pub term_type: *mut i8,
    pub term_caps: *mut *mut i8,
    pub term_ncaps: u_int,
    pub ttyname: *mut i8,
    pub tty: tty,
    pub written: size_t,
    pub discarded: size_t,
    pub redraw: size_t,
    pub repeat_timer: event,
    pub click_timer: event,
    pub click_button: u_int,
    pub click_event: mouse_event,
    pub status: status_line,
    pub flags: uint64_t,
    pub exit_type: C2RustUnnamed_31,
    pub exit_msgtype: msgtype,
    pub exit_session: *mut i8,
    pub exit_message: *mut i8,
    pub keytable: *mut key_table,
    pub last_key: key_code,
    pub redraw_panes: uint64_t,
    pub redraw_scrollbars: uint64_t,
    pub message_ignore_keys: i32,
    pub message_ignore_styles: i32,
    pub message_string: *mut i8,
    pub message_timer: event,
    pub prompt_string: *mut i8,
    pub prompt_buffer: *mut utf8_data,
    pub prompt_last: *mut i8,
    pub prompt_index: size_t,
    pub prompt_inputcb: prompt_input_cb,
    pub prompt_freecb: prompt_free_cb,
    pub prompt_data: *mut (),
    pub prompt_hindex: [u_int; 4],
    pub prompt_mode: C2RustUnnamed_28,
    pub prompt_saved: *mut utf8_data,
    pub prompt_flags: i32,
    pub prompt_type: prompt_type,
    pub prompt_cursor: i32,
    pub session: *mut session,
    pub last_session: *mut session,
    pub references: i32,
    pub pan_window: *mut (),
    pub pan_ox: u_int,
    pub pan_oy: u_int,
    pub overlay_check: overlay_check_cb,
    pub overlay_mode: overlay_mode_cb,
    pub overlay_draw: overlay_draw_cb,
    pub overlay_key: overlay_key_cb,
    pub overlay_free: overlay_free_cb,
    pub overlay_resize: overlay_resize_cb,
    pub overlay_data: *mut (),
    pub overlay_timer: event,
    pub files: client_files,
    pub clipboard_panes: *mut u_int,
    pub clipboard_npanes: u_int,
    pub entry: C2RustUnnamed_9,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct C2RustUnnamed_9 {
    pub tqe_next: *mut client,
    pub tqe_prev: *mut *mut client,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct client_files {
    pub rbh_root: *mut client_file,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct client_file {
    pub c: *mut client,
    pub peer: *mut tmuxpeer,
    pub tree: *mut client_files,
    pub references: i32,
    pub stream: i32,
    pub path: *mut i8,
    pub buffer: *mut evbuffer,
    pub event: *mut bufferevent,
    pub fd: i32,
    pub error: i32,
    pub closed: i32,
    pub cb: client_file_cb,
    pub data: *mut (),
    pub entry: C2RustUnnamed_10,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct C2RustUnnamed_10 {
    pub rbe_left: *mut client_file,
    pub rbe_right: *mut client_file,
    pub rbe_parent: *mut client_file,
    pub rbe_color: i32,
}
pub type client_file_cb = Option<
    unsafe extern "C" fn(*mut client, *const i8, i32, i32, *mut evbuffer, *mut ()) -> (),
>;
pub type overlay_resize_cb = Option<unsafe extern "C" fn(*mut client, *mut ()) -> ()>;
pub type overlay_free_cb = Option<unsafe extern "C" fn(*mut client, *mut ()) -> ()>;
pub type overlay_key_cb =
    Option<unsafe extern "C" fn(*mut client, *mut (), *mut key_event) -> i32>;
#[derive(Copy, Clone)]
#[repr(C)]
pub struct key_event {
    pub key: key_code,
    pub m: mouse_event,
    pub buf: *mut i8,
    pub len: size_t,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct mouse_event {
    pub valid: i32,
    pub ignore: i32,
    pub key: key_code,
    pub statusat: i32,
    pub statuslines: u_int,
    pub x: u_int,
    pub y: u_int,
    pub b: u_int,
    pub lx: u_int,
    pub ly: u_int,
    pub lb: u_int,
    pub ox: u_int,
    pub oy: u_int,
    pub s: i32,
    pub w: i32,
    pub wp: i32,
    pub sgr_type: u_int,
    pub sgr_b: u_int,
}
pub type key_code = u64;
pub type overlay_draw_cb =
    Option<unsafe extern "C" fn(*mut client, *mut (), *mut screen_redraw_ctx) -> ()>;
#[derive(Copy, Clone)]
#[repr(C)]
pub struct screen_redraw_ctx {
    pub c: *mut client,
    pub statuslines: u_int,
    pub statustop: i32,
    pub pane_status: i32,
    pub pane_lines: pane_lines,
    pub pane_scrollbars: i32,
    pub pane_scrollbars_pos: i32,
    pub no_pane_gc: grid_cell,
    pub no_pane_gc_set: i32,
    pub sx: u_int,
    pub sy: u_int,
    pub ox: u_int,
    pub oy: u_int,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct grid_cell {
    pub data: utf8_data,
    pub attr: u_short,
    pub flags: u_char,
    pub fg: i32,
    pub bg: i32,
    pub us: i32,
    pub link: u_int,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct utf8_data {
    pub data: [u_char; 21],
    pub have: u_char,
    pub size: u_char,
    pub width: u_char,
}
pub type pane_lines = u32;
pub const PANE_LINES_NUMBER: pane_lines = 4;
pub const PANE_LINES_SIMPLE: pane_lines = 3;
pub const PANE_LINES_HEAVY: pane_lines = 2;
pub const PANE_LINES_DOUBLE: pane_lines = 1;
pub const PANE_LINES_SINGLE: pane_lines = 0;
pub type overlay_mode_cb = Option<
    unsafe extern "C" fn(*mut client, *mut (), *mut u_int, *mut u_int) -> *mut screen,
>;
#[derive(Copy, Clone)]
#[repr(C)]
pub struct screen {
    pub title: *mut i8,
    pub path: *mut i8,
    pub titles: *mut screen_titles,
    pub grid: *mut grid,
    pub cx: u_int,
    pub cy: u_int,
    pub cstyle: screen_cursor_style,
    pub default_cstyle: screen_cursor_style,
    pub ccolour: i32,
    pub default_ccolour: i32,
    pub rupper: u_int,
    pub rlower: u_int,
    pub mode: i32,
    pub default_mode: i32,
    pub saved_cx: u_int,
    pub saved_cy: u_int,
    pub saved_grid: *mut grid,
    pub saved_cell: grid_cell,
    pub saved_flags: i32,
    pub tabs: *mut bitstr_t,
    pub sel: *mut screen_sel,
    pub write_list: *mut screen_write_cline,
    pub hyperlinks: *mut hyperlinks,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct grid {
    pub flags: i32,
    pub sx: u_int,
    pub sy: u_int,
    pub hscrolled: u_int,
    pub hsize: u_int,
    pub hlimit: u_int,
    pub linedata: *mut grid_line,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct grid_line {
    pub celldata: *mut grid_cell_entry,
    pub cellused: u_int,
    pub cellsize: u_int,
    pub extddata: *mut grid_extd_entry,
    pub extdsize: u_int,
    pub flags: i32,
    pub time: time_t,
}
#[derive(Copy, Clone)]
#[repr(C, packed)]
pub struct grid_extd_entry {
    pub data: utf8_char,
    pub attr: u_short,
    pub flags: u_char,
    pub fg: i32,
    pub bg: i32,
    pub us: i32,
    pub link: u_int,
}
pub type utf8_char = u_int;
#[derive(Copy, Clone)]
#[repr(C, packed)]
pub struct grid_cell_entry {
    pub c2rust_unnamed: C2RustUnnamed_11,
    pub flags: u_char,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub union C2RustUnnamed_11 {
    pub offset: u_int,
    pub data: C2RustUnnamed_12,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct C2RustUnnamed_12 {
    pub attr: u_char,
    pub fg: u_char,
    pub bg: u_char,
    pub data: u_char,
}
pub type screen_cursor_style = u32;
pub const SCREEN_CURSOR_BAR: screen_cursor_style = 3;
pub const SCREEN_CURSOR_UNDERLINE: screen_cursor_style = 2;
pub const SCREEN_CURSOR_BLOCK: screen_cursor_style = 1;
pub const SCREEN_CURSOR_DEFAULT: screen_cursor_style = 0;
pub type overlay_check_cb = Option<
    unsafe extern "C" fn(
        *mut client,
        *mut (),
        u_int,
        u_int,
        u_int,
        *mut overlay_ranges,
    ) -> (),
>;
#[derive(Copy, Clone)]
#[repr(C)]
pub struct overlay_ranges {
    pub px: [u_int; 3],
    pub nx: [u_int; 3],
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct session {
    pub id: u_int,
    pub name: *mut i8,
    pub cwd: *const i8,
    pub creation_time: timeval,
    pub last_attached_time: timeval,
    pub activity_time: timeval,
    pub last_activity_time: timeval,
    pub lock_timer: event,
    pub curw: *mut winlink,
    pub lastw: winlink_stack,
    pub windows: winlinks,
    pub statusat: i32,
    pub statuslines: u_int,
    pub options: *mut options,
    pub flags: i32,
    pub attached: u_int,
    pub tio: *mut termios,
    pub environ: *mut environ,
    pub references: i32,
    pub gentry: C2RustUnnamed_14,
    pub entry: C2RustUnnamed_13,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct C2RustUnnamed_13 {
    pub rbe_left: *mut session,
    pub rbe_right: *mut session,
    pub rbe_parent: *mut session,
    pub rbe_color: i32,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct C2RustUnnamed_14 {
    pub tqe_next: *mut session,
    pub tqe_prev: *mut *mut session,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct winlinks {
    pub rbh_root: *mut winlink,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct winlink {
    pub idx: i32,
    pub session: *mut session,
    pub window: *mut window,
    pub flags: i32,
    pub entry: C2RustUnnamed_17,
    pub wentry: C2RustUnnamed_16,
    pub sentry: C2RustUnnamed_15,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct C2RustUnnamed_15 {
    pub tqe_next: *mut winlink,
    pub tqe_prev: *mut *mut winlink,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct C2RustUnnamed_16 {
    pub tqe_next: *mut winlink,
    pub tqe_prev: *mut *mut winlink,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct C2RustUnnamed_17 {
    pub rbe_left: *mut winlink,
    pub rbe_right: *mut winlink,
    pub rbe_parent: *mut winlink,
    pub rbe_color: i32,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct window {
    pub id: u_int,
    pub latest: *mut (),
    pub name: *mut i8,
    pub name_event: event,
    pub name_time: timeval,
    pub alerts_timer: event,
    pub offset_timer: event,
    pub activity_time: timeval,
    pub active: *mut window_pane,
    pub last_panes: window_panes,
    pub panes: window_panes,
    pub lastlayout: i32,
    pub layout_root: *mut layout_cell,
    pub saved_layout_root: *mut layout_cell,
    pub old_layout: *mut i8,
    pub sx: u_int,
    pub sy: u_int,
    pub manual_sx: u_int,
    pub manual_sy: u_int,
    pub xpixel: u_int,
    pub ypixel: u_int,
    pub new_sx: u_int,
    pub new_sy: u_int,
    pub new_xpixel: u_int,
    pub new_ypixel: u_int,
    pub fill_character: *mut utf8_data,
    pub flags: i32,
    pub alerts_queued: i32,
    pub alerts_entry: C2RustUnnamed_20,
    pub options: *mut options,
    pub references: u_int,
    pub winlinks: C2RustUnnamed_19,
    pub entry: C2RustUnnamed_18,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct C2RustUnnamed_18 {
    pub rbe_left: *mut window,
    pub rbe_right: *mut window,
    pub rbe_parent: *mut window,
    pub rbe_color: i32,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct C2RustUnnamed_19 {
    pub tqh_first: *mut winlink,
    pub tqh_last: *mut *mut winlink,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct C2RustUnnamed_20 {
    pub tqe_next: *mut window,
    pub tqe_prev: *mut *mut window,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct layout_cell {
    pub type_0: layout_type,
    pub parent: *mut layout_cell,
    pub sx: u_int,
    pub sy: u_int,
    pub xoff: u_int,
    pub yoff: u_int,
    pub wp: *mut window_pane,
    pub cells: layout_cells,
    pub entry: C2RustUnnamed_21,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct C2RustUnnamed_21 {
    pub tqe_next: *mut layout_cell,
    pub tqe_prev: *mut *mut layout_cell,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct layout_cells {
    pub tqh_first: *mut layout_cell,
    pub tqh_last: *mut *mut layout_cell,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct window_pane {
    pub id: u_int,
    pub active_point: u_int,
    pub window: *mut window,
    pub options: *mut options,
    pub layout_cell: *mut layout_cell,
    pub saved_layout_cell: *mut layout_cell,
    pub sx: u_int,
    pub sy: u_int,
    pub xoff: u_int,
    pub yoff: u_int,
    pub flags: i32,
    pub sb_slider_y: u_int,
    pub sb_slider_h: u_int,
    pub argc: i32,
    pub argv: *mut *mut i8,
    pub shell: *mut i8,
    pub cwd: *mut i8,
    pub pid: pid_t,
    pub tty: [i8; 32],
    pub status: i32,
    pub dead_time: timeval,
    pub fd: i32,
    pub event: *mut bufferevent,
    pub offset: window_pane_offset,
    pub base_offset: size_t,
    pub resize_queue: window_pane_resizes,
    pub resize_timer: event,
    pub ictx: *mut input_ctx,
    pub cached_gc: grid_cell,
    pub cached_active_gc: grid_cell,
    pub palette: colour_palette,
    pub pipe_fd: i32,
    pub pipe_event: *mut bufferevent,
    pub pipe_offset: window_pane_offset,
    pub screen: *mut screen,
    pub base: screen,
    pub status_screen: screen,
    pub status_size: size_t,
    pub modes: C2RustUnnamed_25,
    pub searchstr: *mut i8,
    pub searchregex: i32,
    pub border_gc_set: i32,
    pub border_gc: grid_cell,
    pub control_bg: i32,
    pub control_fg: i32,
    pub scrollbar_style: style,
    pub entry: C2RustUnnamed_24,
    pub sentry: C2RustUnnamed_23,
    pub tree_entry: C2RustUnnamed_22,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct C2RustUnnamed_22 {
    pub rbe_left: *mut window_pane,
    pub rbe_right: *mut window_pane,
    pub rbe_parent: *mut window_pane,
    pub rbe_color: i32,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct C2RustUnnamed_23 {
    pub tqe_next: *mut window_pane,
    pub tqe_prev: *mut *mut window_pane,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct C2RustUnnamed_24 {
    pub tqe_next: *mut window_pane,
    pub tqe_prev: *mut *mut window_pane,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct style {
    pub gc: grid_cell,
    pub ignore: i32,
    pub fill: i32,
    pub align: style_align,
    pub list: style_list,
    pub range_type: style_range_type,
    pub range_argument: u_int,
    pub range_string: [i8; 16],
    pub width: i32,
    pub pad: i32,
    pub default_type: style_default_type,
}
pub type style_default_type = u32;
pub const STYLE_DEFAULT_POP: style_default_type = 2;
pub const STYLE_DEFAULT_PUSH: style_default_type = 1;
pub const STYLE_DEFAULT_BASE: style_default_type = 0;
pub type style_range_type = u32;
pub const STYLE_RANGE_USER: style_range_type = 6;
pub const STYLE_RANGE_SESSION: style_range_type = 5;
pub const STYLE_RANGE_WINDOW: style_range_type = 4;
pub const STYLE_RANGE_PANE: style_range_type = 3;
pub const STYLE_RANGE_RIGHT: style_range_type = 2;
pub const STYLE_RANGE_LEFT: style_range_type = 1;
pub const STYLE_RANGE_NONE: style_range_type = 0;
pub type style_list = u32;
pub const STYLE_LIST_RIGHT_MARKER: style_list = 4;
pub const STYLE_LIST_LEFT_MARKER: style_list = 3;
pub const STYLE_LIST_FOCUS: style_list = 2;
pub const STYLE_LIST_ON: style_list = 1;
pub const STYLE_LIST_OFF: style_list = 0;
pub type style_align = u32;
pub const STYLE_ALIGN_ABSOLUTE_CENTRE: style_align = 4;
pub const STYLE_ALIGN_RIGHT: style_align = 3;
pub const STYLE_ALIGN_CENTRE: style_align = 2;
pub const STYLE_ALIGN_LEFT: style_align = 1;
pub const STYLE_ALIGN_DEFAULT: style_align = 0;
#[derive(Copy, Clone)]
#[repr(C)]
pub struct C2RustUnnamed_25 {
    pub tqh_first: *mut window_mode_entry,
    pub tqh_last: *mut *mut window_mode_entry,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct window_mode_entry {
    pub wp: *mut window_pane,
    pub swp: *mut window_pane,
    pub mode: *const window_mode,
    pub data: *mut (),
    pub screen: *mut screen,
    pub prefix: u_int,
    pub entry: C2RustUnnamed_26,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct C2RustUnnamed_26 {
    pub tqe_next: *mut window_mode_entry,
    pub tqe_prev: *mut *mut window_mode_entry,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct window_mode {
    pub name: *const i8,
    pub default_format: *const i8,
    pub init: Option<
        unsafe extern "C" fn(*mut window_mode_entry, *mut cmd_find_state, *mut args) -> *mut screen,
    >,
    pub free: Option<unsafe extern "C" fn(*mut window_mode_entry) -> ()>,
    pub resize: Option<unsafe extern "C" fn(*mut window_mode_entry, u_int, u_int) -> ()>,
    pub update: Option<unsafe extern "C" fn(*mut window_mode_entry) -> ()>,
    pub key: Option<
        unsafe extern "C" fn(
            *mut window_mode_entry,
            *mut client,
            *mut session,
            *mut winlink,
            key_code,
            *mut mouse_event,
        ) -> (),
    >,
    pub key_table: Option<unsafe extern "C" fn(*mut window_mode_entry) -> *const i8>,
    pub command: Option<
        unsafe extern "C" fn(
            *mut window_mode_entry,
            *mut client,
            *mut session,
            *mut winlink,
            *mut args,
            *mut mouse_event,
        ) -> (),
    >,
    pub formats: Option<unsafe extern "C" fn(*mut window_mode_entry, *mut format_tree) -> ()>,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct cmd_find_state {
    pub flags: i32,
    pub current: *mut cmd_find_state,
    pub s: *mut session,
    pub wl: *mut winlink,
    pub w: *mut window,
    pub wp: *mut window_pane,
    pub idx: i32,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct window_pane_offset {
    pub used: size_t,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct colour_palette {
    pub fg: i32,
    pub bg: i32,
    pub palette: *mut i32,
    pub default_palette: *mut i32,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct window_pane_resizes {
    pub tqh_first: *mut window_pane_resize,
    pub tqh_last: *mut *mut window_pane_resize,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct window_pane_resize {
    pub sx: u_int,
    pub sy: u_int,
    pub osx: u_int,
    pub osy: u_int,
    pub entry: C2RustUnnamed_27,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct C2RustUnnamed_27 {
    pub tqe_next: *mut window_pane_resize,
    pub tqe_prev: *mut *mut window_pane_resize,
}
pub type layout_type = u32;
pub const LAYOUT_WINDOWPANE: layout_type = 2;
pub const LAYOUT_TOPBOTTOM: layout_type = 1;
pub const LAYOUT_LEFTRIGHT: layout_type = 0;
#[derive(Copy, Clone)]
#[repr(C)]
pub struct window_panes {
    pub tqh_first: *mut window_pane,
    pub tqh_last: *mut *mut window_pane,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct winlink_stack {
    pub tqh_first: *mut winlink,
    pub tqh_last: *mut *mut winlink,
}
pub type prompt_type = u32;
pub const PROMPT_TYPE_INVALID: prompt_type = 255;
pub const PROMPT_TYPE_WINDOW_TARGET: prompt_type = 3;
pub const PROMPT_TYPE_TARGET: prompt_type = 2;
pub const PROMPT_TYPE_SEARCH: prompt_type = 1;
pub const PROMPT_TYPE_COMMAND: prompt_type = 0;
pub type C2RustUnnamed_28 = u32;
pub const PROMPT_COMMAND: C2RustUnnamed_28 = 1;
pub const PROMPT_ENTRY: C2RustUnnamed_28 = 0;
pub type prompt_free_cb = Option<unsafe extern "C" fn(*mut ()) -> ()>;
pub type prompt_input_cb =
    Option<unsafe extern "C" fn(*mut client, *mut (), *const i8, i32) -> i32>;
#[derive(Copy, Clone)]
#[repr(C)]
pub struct key_table {
    pub name: *const i8,
    pub activity_time: timeval,
    pub key_bindings: key_bindings,
    pub default_key_bindings: key_bindings,
    pub references: u_int,
    pub entry: C2RustUnnamed_29,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct C2RustUnnamed_29 {
    pub rbe_left: *mut key_table,
    pub rbe_right: *mut key_table,
    pub rbe_parent: *mut key_table,
    pub rbe_color: i32,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct key_bindings {
    pub rbh_root: *mut key_binding,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct key_binding {
    pub key: key_code,
    pub cmdlist: *mut cmd_list,
    pub note: *const i8,
    pub flags: i32,
    pub entry: C2RustUnnamed_30,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct C2RustUnnamed_30 {
    pub rbe_left: *mut key_binding,
    pub rbe_right: *mut key_binding,
    pub rbe_parent: *mut key_binding,
    pub rbe_color: i32,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct cmd_list {
    pub references: i32,
    pub group: u_int,
    pub list: *mut cmds,
}
pub type C2RustUnnamed_31 = u32;
pub const CLIENT_EXIT_DETACH: C2RustUnnamed_31 = 2;
pub const CLIENT_EXIT_SHUTDOWN: C2RustUnnamed_31 = 1;
pub const CLIENT_EXIT_RETURN: C2RustUnnamed_31 = 0;
#[derive(Copy, Clone)]
#[repr(C)]
pub struct status_line {
    pub timer: event,
    pub screen: screen,
    pub active: *mut screen,
    pub references: i32,
    pub style: grid_cell,
    pub entries: [status_line_entry; 5],
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct status_line_entry {
    pub expanded: *mut i8,
    pub ranges: style_ranges,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct style_ranges {
    pub tqh_first: *mut style_range,
    pub tqh_last: *mut *mut style_range,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct style_range {
    pub type_0: style_range_type,
    pub argument: u_int,
    pub string: [i8; 16],
    pub start: u_int,
    pub end: u_int,
    pub entry: C2RustUnnamed_32,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct C2RustUnnamed_32 {
    pub tqe_next: *mut style_range,
    pub tqe_prev: *mut *mut style_range,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct tty {
    pub client: *mut client,
    pub start_timer: event,
    pub clipboard_timer: event,
    pub last_requests: time_t,
    pub sx: u_int,
    pub sy: u_int,
    pub xpixel: u_int,
    pub ypixel: u_int,
    pub cx: u_int,
    pub cy: u_int,
    pub cstyle: screen_cursor_style,
    pub ccolour: i32,
    pub oflag: i32,
    pub oox: u_int,
    pub ooy: u_int,
    pub osx: u_int,
    pub osy: u_int,
    pub mode: i32,
    pub fg: i32,
    pub bg: i32,
    pub rlower: u_int,
    pub rupper: u_int,
    pub rleft: u_int,
    pub rright: u_int,
    pub event_in: event,
    pub in_0: *mut evbuffer,
    pub event_out: event,
    pub out: *mut evbuffer,
    pub timer: event,
    pub discarded: size_t,
    pub tio: termios,
    pub cell: grid_cell,
    pub last_cell: grid_cell,
    pub flags: i32,
    pub term: *mut tty_term,
    pub mouse_last_x: u_int,
    pub mouse_last_y: u_int,
    pub mouse_last_b: u_int,
    pub mouse_drag_flag: i32,
    pub mouse_scrolling_flag: i32,
    pub mouse_slider_mpos: i32,
    pub mouse_drag_update: Option<unsafe extern "C" fn(*mut client, *mut mouse_event) -> ()>,
    pub mouse_drag_release: Option<unsafe extern "C" fn(*mut client, *mut mouse_event) -> ()>,
    pub key_timer: event,
    pub key_tree: *mut tty_key,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct tty_key {
    pub ch: i8,
    pub key: key_code,
    pub left: *mut tty_key,
    pub right: *mut tty_key,
    pub next: *mut tty_key,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct tty_term {
    pub name: *mut i8,
    pub tty: *mut tty,
    pub features: i32,
    pub acs: [[i8; 2]; 256],
    pub codes: *mut tty_code,
    pub flags: i32,
    pub entry: C2RustUnnamed_33,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct C2RustUnnamed_33 {
    pub le_next: *mut tty_term,
    pub le_prev: *mut *mut tty_term,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct client_windows {
    pub rbh_root: *mut client_window,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct client_window {
    pub window: u_int,
    pub pane: *mut window_pane,
    pub sx: u_int,
    pub sy: u_int,
    pub entry: C2RustUnnamed_34,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct C2RustUnnamed_34 {
    pub rbe_left: *mut client_window,
    pub rbe_right: *mut client_window,
    pub rbe_parent: *mut client_window,
    pub rbe_color: i32,
}
pub type C2RustUnnamed_35 = u32;
pub const C0_US: C2RustUnnamed_35 = 31;
pub const C0_RS: C2RustUnnamed_35 = 30;
pub const C0_GS: C2RustUnnamed_35 = 29;
pub const C0_FS: C2RustUnnamed_35 = 28;
pub const C0_ESC: C2RustUnnamed_35 = 27;
pub const C0_SUB: C2RustUnnamed_35 = 26;
pub const C0_EM: C2RustUnnamed_35 = 25;
pub const C0_CAN: C2RustUnnamed_35 = 24;
pub const C0_ETB: C2RustUnnamed_35 = 23;
pub const C0_SYN: C2RustUnnamed_35 = 22;
pub const C0_NAK: C2RustUnnamed_35 = 21;
pub const C0_DC4: C2RustUnnamed_35 = 20;
pub const C0_DC3: C2RustUnnamed_35 = 19;
pub const C0_DC2: C2RustUnnamed_35 = 18;
pub const C0_DC1: C2RustUnnamed_35 = 17;
pub const C0_DLE: C2RustUnnamed_35 = 16;
pub const C0_SI: C2RustUnnamed_35 = 15;
pub const C0_SO: C2RustUnnamed_35 = 14;
pub const C0_CR: C2RustUnnamed_35 = 13;
pub const C0_FF: C2RustUnnamed_35 = 12;
pub const C0_VT: C2RustUnnamed_35 = 11;
pub const C0_LF: C2RustUnnamed_35 = 10;
pub const C0_HT: C2RustUnnamed_35 = 9;
pub const C0_BS: C2RustUnnamed_35 = 8;
pub const C0_BEL: C2RustUnnamed_35 = 7;
pub const C0_ASC: C2RustUnnamed_35 = 6;
pub const C0_ENQ: C2RustUnnamed_35 = 5;
pub const C0_EOT: C2RustUnnamed_35 = 4;
pub const C0_ETX: C2RustUnnamed_35 = 3;
pub const C0_STX: C2RustUnnamed_35 = 2;
pub const C0_SOH: C2RustUnnamed_35 = 1;
pub const C0_NUL: C2RustUnnamed_35 = 0;
pub type C2RustUnnamed_36 = u32;
pub const KEYC_BASE_END: C2RustUnnamed_36 = 1106562;
pub const KEYC_KP_PERIOD: C2RustUnnamed_36 = 1106561;
pub const KEYC_KP_ZERO: C2RustUnnamed_36 = 1106560;
pub const KEYC_KP_ENTER: C2RustUnnamed_36 = 1106559;
pub const KEYC_KP_THREE: C2RustUnnamed_36 = 1106558;
pub const KEYC_KP_TWO: C2RustUnnamed_36 = 1106557;
pub const KEYC_KP_ONE: C2RustUnnamed_36 = 1106556;
pub const KEYC_KP_SIX: C2RustUnnamed_36 = 1106555;
pub const KEYC_KP_FIVE: C2RustUnnamed_36 = 1106554;
pub const KEYC_KP_FOUR: C2RustUnnamed_36 = 1106553;
pub const KEYC_KP_PLUS: C2RustUnnamed_36 = 1106552;
pub const KEYC_KP_NINE: C2RustUnnamed_36 = 1106551;
pub const KEYC_KP_EIGHT: C2RustUnnamed_36 = 1106550;
pub const KEYC_KP_SEVEN: C2RustUnnamed_36 = 1106549;
pub const KEYC_KP_MINUS: C2RustUnnamed_36 = 1106548;
pub const KEYC_KP_STAR: C2RustUnnamed_36 = 1106547;
pub const KEYC_KP_SLASH: C2RustUnnamed_36 = 1106546;
pub const KEYC_RIGHT: C2RustUnnamed_36 = 1106545;
pub const KEYC_LEFT: C2RustUnnamed_36 = 1106544;
pub const KEYC_DOWN: C2RustUnnamed_36 = 1106543;
pub const KEYC_UP: C2RustUnnamed_36 = 1106542;
pub const KEYC_BTAB: C2RustUnnamed_36 = 1106541;
pub const KEYC_PPAGE: C2RustUnnamed_36 = 1106540;
pub const KEYC_NPAGE: C2RustUnnamed_36 = 1106539;
pub const KEYC_END: C2RustUnnamed_36 = 1106538;
pub const KEYC_HOME: C2RustUnnamed_36 = 1106537;
pub const KEYC_DC: C2RustUnnamed_36 = 1106536;
pub const KEYC_IC: C2RustUnnamed_36 = 1106535;
pub const KEYC_F12: C2RustUnnamed_36 = 1106534;
pub const KEYC_F11: C2RustUnnamed_36 = 1106533;
pub const KEYC_F10: C2RustUnnamed_36 = 1106532;
pub const KEYC_F9: C2RustUnnamed_36 = 1106531;
pub const KEYC_F8: C2RustUnnamed_36 = 1106530;
pub const KEYC_F7: C2RustUnnamed_36 = 1106529;
pub const KEYC_F6: C2RustUnnamed_36 = 1106528;
pub const KEYC_F5: C2RustUnnamed_36 = 1106527;
pub const KEYC_F4: C2RustUnnamed_36 = 1106526;
pub const KEYC_F3: C2RustUnnamed_36 = 1106525;
pub const KEYC_F2: C2RustUnnamed_36 = 1106524;
pub const KEYC_F1: C2RustUnnamed_36 = 1106523;
pub const KEYC_BSPACE: C2RustUnnamed_36 = 1106522;
pub const KEYC_TRIPLECLICK11_BORDER: C2RustUnnamed_36 = 1106521;
pub const KEYC_TRIPLECLICK11_SCROLLBAR_DOWN: C2RustUnnamed_36 = 1106520;
pub const KEYC_TRIPLECLICK11_SCROLLBAR_SLIDER: C2RustUnnamed_36 = 1106519;
pub const KEYC_TRIPLECLICK11_SCROLLBAR_UP: C2RustUnnamed_36 = 1106518;
pub const KEYC_TRIPLECLICK11_STATUS_DEFAULT: C2RustUnnamed_36 = 1106517;
pub const KEYC_TRIPLECLICK11_STATUS_RIGHT: C2RustUnnamed_36 = 1106516;
pub const KEYC_TRIPLECLICK11_STATUS_LEFT: C2RustUnnamed_36 = 1106515;
pub const KEYC_TRIPLECLICK11_STATUS: C2RustUnnamed_36 = 1106514;
pub const KEYC_TRIPLECLICK11_PANE: C2RustUnnamed_36 = 1106513;
pub const KEYC_TRIPLECLICK10_BORDER: C2RustUnnamed_36 = 1106512;
pub const KEYC_TRIPLECLICK10_SCROLLBAR_DOWN: C2RustUnnamed_36 = 1106511;
pub const KEYC_TRIPLECLICK10_SCROLLBAR_SLIDER: C2RustUnnamed_36 = 1106510;
pub const KEYC_TRIPLECLICK10_SCROLLBAR_UP: C2RustUnnamed_36 = 1106509;
pub const KEYC_TRIPLECLICK10_STATUS_DEFAULT: C2RustUnnamed_36 = 1106508;
pub const KEYC_TRIPLECLICK10_STATUS_RIGHT: C2RustUnnamed_36 = 1106507;
pub const KEYC_TRIPLECLICK10_STATUS_LEFT: C2RustUnnamed_36 = 1106506;
pub const KEYC_TRIPLECLICK10_STATUS: C2RustUnnamed_36 = 1106505;
pub const KEYC_TRIPLECLICK10_PANE: C2RustUnnamed_36 = 1106504;
pub const KEYC_TRIPLECLICK9_BORDER: C2RustUnnamed_36 = 1106503;
pub const KEYC_TRIPLECLICK9_SCROLLBAR_DOWN: C2RustUnnamed_36 = 1106502;
pub const KEYC_TRIPLECLICK9_SCROLLBAR_SLIDER: C2RustUnnamed_36 = 1106501;
pub const KEYC_TRIPLECLICK9_SCROLLBAR_UP: C2RustUnnamed_36 = 1106500;
pub const KEYC_TRIPLECLICK9_STATUS_DEFAULT: C2RustUnnamed_36 = 1106499;
pub const KEYC_TRIPLECLICK9_STATUS_RIGHT: C2RustUnnamed_36 = 1106498;
pub const KEYC_TRIPLECLICK9_STATUS_LEFT: C2RustUnnamed_36 = 1106497;
pub const KEYC_TRIPLECLICK9_STATUS: C2RustUnnamed_36 = 1106496;
pub const KEYC_TRIPLECLICK9_PANE: C2RustUnnamed_36 = 1106495;
pub const KEYC_TRIPLECLICK8_BORDER: C2RustUnnamed_36 = 1106494;
pub const KEYC_TRIPLECLICK8_SCROLLBAR_DOWN: C2RustUnnamed_36 = 1106493;
pub const KEYC_TRIPLECLICK8_SCROLLBAR_SLIDER: C2RustUnnamed_36 = 1106492;
pub const KEYC_TRIPLECLICK8_SCROLLBAR_UP: C2RustUnnamed_36 = 1106491;
pub const KEYC_TRIPLECLICK8_STATUS_DEFAULT: C2RustUnnamed_36 = 1106490;
pub const KEYC_TRIPLECLICK8_STATUS_RIGHT: C2RustUnnamed_36 = 1106489;
pub const KEYC_TRIPLECLICK8_STATUS_LEFT: C2RustUnnamed_36 = 1106488;
pub const KEYC_TRIPLECLICK8_STATUS: C2RustUnnamed_36 = 1106487;
pub const KEYC_TRIPLECLICK8_PANE: C2RustUnnamed_36 = 1106486;
pub const KEYC_TRIPLECLICK7_BORDER: C2RustUnnamed_36 = 1106485;
pub const KEYC_TRIPLECLICK7_SCROLLBAR_DOWN: C2RustUnnamed_36 = 1106484;
pub const KEYC_TRIPLECLICK7_SCROLLBAR_SLIDER: C2RustUnnamed_36 = 1106483;
pub const KEYC_TRIPLECLICK7_SCROLLBAR_UP: C2RustUnnamed_36 = 1106482;
pub const KEYC_TRIPLECLICK7_STATUS_DEFAULT: C2RustUnnamed_36 = 1106481;
pub const KEYC_TRIPLECLICK7_STATUS_RIGHT: C2RustUnnamed_36 = 1106480;
pub const KEYC_TRIPLECLICK7_STATUS_LEFT: C2RustUnnamed_36 = 1106479;
pub const KEYC_TRIPLECLICK7_STATUS: C2RustUnnamed_36 = 1106478;
pub const KEYC_TRIPLECLICK7_PANE: C2RustUnnamed_36 = 1106477;
pub const KEYC_TRIPLECLICK6_BORDER: C2RustUnnamed_36 = 1106476;
pub const KEYC_TRIPLECLICK6_SCROLLBAR_DOWN: C2RustUnnamed_36 = 1106475;
pub const KEYC_TRIPLECLICK6_SCROLLBAR_SLIDER: C2RustUnnamed_36 = 1106474;
pub const KEYC_TRIPLECLICK6_SCROLLBAR_UP: C2RustUnnamed_36 = 1106473;
pub const KEYC_TRIPLECLICK6_STATUS_DEFAULT: C2RustUnnamed_36 = 1106472;
pub const KEYC_TRIPLECLICK6_STATUS_RIGHT: C2RustUnnamed_36 = 1106471;
pub const KEYC_TRIPLECLICK6_STATUS_LEFT: C2RustUnnamed_36 = 1106470;
pub const KEYC_TRIPLECLICK6_STATUS: C2RustUnnamed_36 = 1106469;
pub const KEYC_TRIPLECLICK6_PANE: C2RustUnnamed_36 = 1106468;
pub const KEYC_TRIPLECLICK3_BORDER: C2RustUnnamed_36 = 1106467;
pub const KEYC_TRIPLECLICK3_SCROLLBAR_DOWN: C2RustUnnamed_36 = 1106466;
pub const KEYC_TRIPLECLICK3_SCROLLBAR_SLIDER: C2RustUnnamed_36 = 1106465;
pub const KEYC_TRIPLECLICK3_SCROLLBAR_UP: C2RustUnnamed_36 = 1106464;
pub const KEYC_TRIPLECLICK3_STATUS_DEFAULT: C2RustUnnamed_36 = 1106463;
pub const KEYC_TRIPLECLICK3_STATUS_RIGHT: C2RustUnnamed_36 = 1106462;
pub const KEYC_TRIPLECLICK3_STATUS_LEFT: C2RustUnnamed_36 = 1106461;
pub const KEYC_TRIPLECLICK3_STATUS: C2RustUnnamed_36 = 1106460;
pub const KEYC_TRIPLECLICK3_PANE: C2RustUnnamed_36 = 1106459;
pub const KEYC_TRIPLECLICK2_BORDER: C2RustUnnamed_36 = 1106458;
pub const KEYC_TRIPLECLICK2_SCROLLBAR_DOWN: C2RustUnnamed_36 = 1106457;
pub const KEYC_TRIPLECLICK2_SCROLLBAR_SLIDER: C2RustUnnamed_36 = 1106456;
pub const KEYC_TRIPLECLICK2_SCROLLBAR_UP: C2RustUnnamed_36 = 1106455;
pub const KEYC_TRIPLECLICK2_STATUS_DEFAULT: C2RustUnnamed_36 = 1106454;
pub const KEYC_TRIPLECLICK2_STATUS_RIGHT: C2RustUnnamed_36 = 1106453;
pub const KEYC_TRIPLECLICK2_STATUS_LEFT: C2RustUnnamed_36 = 1106452;
pub const KEYC_TRIPLECLICK2_STATUS: C2RustUnnamed_36 = 1106451;
pub const KEYC_TRIPLECLICK2_PANE: C2RustUnnamed_36 = 1106450;
pub const KEYC_TRIPLECLICK1_BORDER: C2RustUnnamed_36 = 1106449;
pub const KEYC_TRIPLECLICK1_SCROLLBAR_DOWN: C2RustUnnamed_36 = 1106448;
pub const KEYC_TRIPLECLICK1_SCROLLBAR_SLIDER: C2RustUnnamed_36 = 1106447;
pub const KEYC_TRIPLECLICK1_SCROLLBAR_UP: C2RustUnnamed_36 = 1106446;
pub const KEYC_TRIPLECLICK1_STATUS_DEFAULT: C2RustUnnamed_36 = 1106445;
pub const KEYC_TRIPLECLICK1_STATUS_RIGHT: C2RustUnnamed_36 = 1106444;
pub const KEYC_TRIPLECLICK1_STATUS_LEFT: C2RustUnnamed_36 = 1106443;
pub const KEYC_TRIPLECLICK1_STATUS: C2RustUnnamed_36 = 1106442;
pub const KEYC_TRIPLECLICK1_PANE: C2RustUnnamed_36 = 1106441;
pub const KEYC_DOUBLECLICK11_BORDER: C2RustUnnamed_36 = 1106440;
pub const KEYC_DOUBLECLICK11_SCROLLBAR_DOWN: C2RustUnnamed_36 = 1106439;
pub const KEYC_DOUBLECLICK11_SCROLLBAR_SLIDER: C2RustUnnamed_36 = 1106438;
pub const KEYC_DOUBLECLICK11_SCROLLBAR_UP: C2RustUnnamed_36 = 1106437;
pub const KEYC_DOUBLECLICK11_STATUS_DEFAULT: C2RustUnnamed_36 = 1106436;
pub const KEYC_DOUBLECLICK11_STATUS_RIGHT: C2RustUnnamed_36 = 1106435;
pub const KEYC_DOUBLECLICK11_STATUS_LEFT: C2RustUnnamed_36 = 1106434;
pub const KEYC_DOUBLECLICK11_STATUS: C2RustUnnamed_36 = 1106433;
pub const KEYC_DOUBLECLICK11_PANE: C2RustUnnamed_36 = 1106432;
pub const KEYC_DOUBLECLICK10_BORDER: C2RustUnnamed_36 = 1106431;
pub const KEYC_DOUBLECLICK10_SCROLLBAR_DOWN: C2RustUnnamed_36 = 1106430;
pub const KEYC_DOUBLECLICK10_SCROLLBAR_SLIDER: C2RustUnnamed_36 = 1106429;
pub const KEYC_DOUBLECLICK10_SCROLLBAR_UP: C2RustUnnamed_36 = 1106428;
pub const KEYC_DOUBLECLICK10_STATUS_DEFAULT: C2RustUnnamed_36 = 1106427;
pub const KEYC_DOUBLECLICK10_STATUS_RIGHT: C2RustUnnamed_36 = 1106426;
pub const KEYC_DOUBLECLICK10_STATUS_LEFT: C2RustUnnamed_36 = 1106425;
pub const KEYC_DOUBLECLICK10_STATUS: C2RustUnnamed_36 = 1106424;
pub const KEYC_DOUBLECLICK10_PANE: C2RustUnnamed_36 = 1106423;
pub const KEYC_DOUBLECLICK9_BORDER: C2RustUnnamed_36 = 1106422;
pub const KEYC_DOUBLECLICK9_SCROLLBAR_DOWN: C2RustUnnamed_36 = 1106421;
pub const KEYC_DOUBLECLICK9_SCROLLBAR_SLIDER: C2RustUnnamed_36 = 1106420;
pub const KEYC_DOUBLECLICK9_SCROLLBAR_UP: C2RustUnnamed_36 = 1106419;
pub const KEYC_DOUBLECLICK9_STATUS_DEFAULT: C2RustUnnamed_36 = 1106418;
pub const KEYC_DOUBLECLICK9_STATUS_RIGHT: C2RustUnnamed_36 = 1106417;
pub const KEYC_DOUBLECLICK9_STATUS_LEFT: C2RustUnnamed_36 = 1106416;
pub const KEYC_DOUBLECLICK9_STATUS: C2RustUnnamed_36 = 1106415;
pub const KEYC_DOUBLECLICK9_PANE: C2RustUnnamed_36 = 1106414;
pub const KEYC_DOUBLECLICK8_BORDER: C2RustUnnamed_36 = 1106413;
pub const KEYC_DOUBLECLICK8_SCROLLBAR_DOWN: C2RustUnnamed_36 = 1106412;
pub const KEYC_DOUBLECLICK8_SCROLLBAR_SLIDER: C2RustUnnamed_36 = 1106411;
pub const KEYC_DOUBLECLICK8_SCROLLBAR_UP: C2RustUnnamed_36 = 1106410;
pub const KEYC_DOUBLECLICK8_STATUS_DEFAULT: C2RustUnnamed_36 = 1106409;
pub const KEYC_DOUBLECLICK8_STATUS_RIGHT: C2RustUnnamed_36 = 1106408;
pub const KEYC_DOUBLECLICK8_STATUS_LEFT: C2RustUnnamed_36 = 1106407;
pub const KEYC_DOUBLECLICK8_STATUS: C2RustUnnamed_36 = 1106406;
pub const KEYC_DOUBLECLICK8_PANE: C2RustUnnamed_36 = 1106405;
pub const KEYC_DOUBLECLICK7_BORDER: C2RustUnnamed_36 = 1106404;
pub const KEYC_DOUBLECLICK7_SCROLLBAR_DOWN: C2RustUnnamed_36 = 1106403;
pub const KEYC_DOUBLECLICK7_SCROLLBAR_SLIDER: C2RustUnnamed_36 = 1106402;
pub const KEYC_DOUBLECLICK7_SCROLLBAR_UP: C2RustUnnamed_36 = 1106401;
pub const KEYC_DOUBLECLICK7_STATUS_DEFAULT: C2RustUnnamed_36 = 1106400;
pub const KEYC_DOUBLECLICK7_STATUS_RIGHT: C2RustUnnamed_36 = 1106399;
pub const KEYC_DOUBLECLICK7_STATUS_LEFT: C2RustUnnamed_36 = 1106398;
pub const KEYC_DOUBLECLICK7_STATUS: C2RustUnnamed_36 = 1106397;
pub const KEYC_DOUBLECLICK7_PANE: C2RustUnnamed_36 = 1106396;
pub const KEYC_DOUBLECLICK6_BORDER: C2RustUnnamed_36 = 1106395;
pub const KEYC_DOUBLECLICK6_SCROLLBAR_DOWN: C2RustUnnamed_36 = 1106394;
pub const KEYC_DOUBLECLICK6_SCROLLBAR_SLIDER: C2RustUnnamed_36 = 1106393;
pub const KEYC_DOUBLECLICK6_SCROLLBAR_UP: C2RustUnnamed_36 = 1106392;
pub const KEYC_DOUBLECLICK6_STATUS_DEFAULT: C2RustUnnamed_36 = 1106391;
pub const KEYC_DOUBLECLICK6_STATUS_RIGHT: C2RustUnnamed_36 = 1106390;
pub const KEYC_DOUBLECLICK6_STATUS_LEFT: C2RustUnnamed_36 = 1106389;
pub const KEYC_DOUBLECLICK6_STATUS: C2RustUnnamed_36 = 1106388;
pub const KEYC_DOUBLECLICK6_PANE: C2RustUnnamed_36 = 1106387;
pub const KEYC_DOUBLECLICK3_BORDER: C2RustUnnamed_36 = 1106386;
pub const KEYC_DOUBLECLICK3_SCROLLBAR_DOWN: C2RustUnnamed_36 = 1106385;
pub const KEYC_DOUBLECLICK3_SCROLLBAR_SLIDER: C2RustUnnamed_36 = 1106384;
pub const KEYC_DOUBLECLICK3_SCROLLBAR_UP: C2RustUnnamed_36 = 1106383;
pub const KEYC_DOUBLECLICK3_STATUS_DEFAULT: C2RustUnnamed_36 = 1106382;
pub const KEYC_DOUBLECLICK3_STATUS_RIGHT: C2RustUnnamed_36 = 1106381;
pub const KEYC_DOUBLECLICK3_STATUS_LEFT: C2RustUnnamed_36 = 1106380;
pub const KEYC_DOUBLECLICK3_STATUS: C2RustUnnamed_36 = 1106379;
pub const KEYC_DOUBLECLICK3_PANE: C2RustUnnamed_36 = 1106378;
pub const KEYC_DOUBLECLICK2_BORDER: C2RustUnnamed_36 = 1106377;
pub const KEYC_DOUBLECLICK2_SCROLLBAR_DOWN: C2RustUnnamed_36 = 1106376;
pub const KEYC_DOUBLECLICK2_SCROLLBAR_SLIDER: C2RustUnnamed_36 = 1106375;
pub const KEYC_DOUBLECLICK2_SCROLLBAR_UP: C2RustUnnamed_36 = 1106374;
pub const KEYC_DOUBLECLICK2_STATUS_DEFAULT: C2RustUnnamed_36 = 1106373;
pub const KEYC_DOUBLECLICK2_STATUS_RIGHT: C2RustUnnamed_36 = 1106372;
pub const KEYC_DOUBLECLICK2_STATUS_LEFT: C2RustUnnamed_36 = 1106371;
pub const KEYC_DOUBLECLICK2_STATUS: C2RustUnnamed_36 = 1106370;
pub const KEYC_DOUBLECLICK2_PANE: C2RustUnnamed_36 = 1106369;
pub const KEYC_DOUBLECLICK1_BORDER: C2RustUnnamed_36 = 1106368;
pub const KEYC_DOUBLECLICK1_SCROLLBAR_DOWN: C2RustUnnamed_36 = 1106367;
pub const KEYC_DOUBLECLICK1_SCROLLBAR_SLIDER: C2RustUnnamed_36 = 1106366;
pub const KEYC_DOUBLECLICK1_SCROLLBAR_UP: C2RustUnnamed_36 = 1106365;
pub const KEYC_DOUBLECLICK1_STATUS_DEFAULT: C2RustUnnamed_36 = 1106364;
pub const KEYC_DOUBLECLICK1_STATUS_RIGHT: C2RustUnnamed_36 = 1106363;
pub const KEYC_DOUBLECLICK1_STATUS_LEFT: C2RustUnnamed_36 = 1106362;
pub const KEYC_DOUBLECLICK1_STATUS: C2RustUnnamed_36 = 1106361;
pub const KEYC_DOUBLECLICK1_PANE: C2RustUnnamed_36 = 1106360;
pub const KEYC_SECONDCLICK11_BORDER: C2RustUnnamed_36 = 1106359;
pub const KEYC_SECONDCLICK11_SCROLLBAR_DOWN: C2RustUnnamed_36 = 1106358;
pub const KEYC_SECONDCLICK11_SCROLLBAR_SLIDER: C2RustUnnamed_36 = 1106357;
pub const KEYC_SECONDCLICK11_SCROLLBAR_UP: C2RustUnnamed_36 = 1106356;
pub const KEYC_SECONDCLICK11_STATUS_DEFAULT: C2RustUnnamed_36 = 1106355;
pub const KEYC_SECONDCLICK11_STATUS_RIGHT: C2RustUnnamed_36 = 1106354;
pub const KEYC_SECONDCLICK11_STATUS_LEFT: C2RustUnnamed_36 = 1106353;
pub const KEYC_SECONDCLICK11_STATUS: C2RustUnnamed_36 = 1106352;
pub const KEYC_SECONDCLICK11_PANE: C2RustUnnamed_36 = 1106351;
pub const KEYC_SECONDCLICK10_BORDER: C2RustUnnamed_36 = 1106350;
pub const KEYC_SECONDCLICK10_SCROLLBAR_DOWN: C2RustUnnamed_36 = 1106349;
pub const KEYC_SECONDCLICK10_SCROLLBAR_SLIDER: C2RustUnnamed_36 = 1106348;
pub const KEYC_SECONDCLICK10_SCROLLBAR_UP: C2RustUnnamed_36 = 1106347;
pub const KEYC_SECONDCLICK10_STATUS_DEFAULT: C2RustUnnamed_36 = 1106346;
pub const KEYC_SECONDCLICK10_STATUS_RIGHT: C2RustUnnamed_36 = 1106345;
pub const KEYC_SECONDCLICK10_STATUS_LEFT: C2RustUnnamed_36 = 1106344;
pub const KEYC_SECONDCLICK10_STATUS: C2RustUnnamed_36 = 1106343;
pub const KEYC_SECONDCLICK10_PANE: C2RustUnnamed_36 = 1106342;
pub const KEYC_SECONDCLICK9_BORDER: C2RustUnnamed_36 = 1106341;
pub const KEYC_SECONDCLICK9_SCROLLBAR_DOWN: C2RustUnnamed_36 = 1106340;
pub const KEYC_SECONDCLICK9_SCROLLBAR_SLIDER: C2RustUnnamed_36 = 1106339;
pub const KEYC_SECONDCLICK9_SCROLLBAR_UP: C2RustUnnamed_36 = 1106338;
pub const KEYC_SECONDCLICK9_STATUS_DEFAULT: C2RustUnnamed_36 = 1106337;
pub const KEYC_SECONDCLICK9_STATUS_RIGHT: C2RustUnnamed_36 = 1106336;
pub const KEYC_SECONDCLICK9_STATUS_LEFT: C2RustUnnamed_36 = 1106335;
pub const KEYC_SECONDCLICK9_STATUS: C2RustUnnamed_36 = 1106334;
pub const KEYC_SECONDCLICK9_PANE: C2RustUnnamed_36 = 1106333;
pub const KEYC_SECONDCLICK8_BORDER: C2RustUnnamed_36 = 1106332;
pub const KEYC_SECONDCLICK8_SCROLLBAR_DOWN: C2RustUnnamed_36 = 1106331;
pub const KEYC_SECONDCLICK8_SCROLLBAR_SLIDER: C2RustUnnamed_36 = 1106330;
pub const KEYC_SECONDCLICK8_SCROLLBAR_UP: C2RustUnnamed_36 = 1106329;
pub const KEYC_SECONDCLICK8_STATUS_DEFAULT: C2RustUnnamed_36 = 1106328;
pub const KEYC_SECONDCLICK8_STATUS_RIGHT: C2RustUnnamed_36 = 1106327;
pub const KEYC_SECONDCLICK8_STATUS_LEFT: C2RustUnnamed_36 = 1106326;
pub const KEYC_SECONDCLICK8_STATUS: C2RustUnnamed_36 = 1106325;
pub const KEYC_SECONDCLICK8_PANE: C2RustUnnamed_36 = 1106324;
pub const KEYC_SECONDCLICK7_BORDER: C2RustUnnamed_36 = 1106323;
pub const KEYC_SECONDCLICK7_SCROLLBAR_DOWN: C2RustUnnamed_36 = 1106322;
pub const KEYC_SECONDCLICK7_SCROLLBAR_SLIDER: C2RustUnnamed_36 = 1106321;
pub const KEYC_SECONDCLICK7_SCROLLBAR_UP: C2RustUnnamed_36 = 1106320;
pub const KEYC_SECONDCLICK7_STATUS_DEFAULT: C2RustUnnamed_36 = 1106319;
pub const KEYC_SECONDCLICK7_STATUS_RIGHT: C2RustUnnamed_36 = 1106318;
pub const KEYC_SECONDCLICK7_STATUS_LEFT: C2RustUnnamed_36 = 1106317;
pub const KEYC_SECONDCLICK7_STATUS: C2RustUnnamed_36 = 1106316;
pub const KEYC_SECONDCLICK7_PANE: C2RustUnnamed_36 = 1106315;
pub const KEYC_SECONDCLICK6_BORDER: C2RustUnnamed_36 = 1106314;
pub const KEYC_SECONDCLICK6_SCROLLBAR_DOWN: C2RustUnnamed_36 = 1106313;
pub const KEYC_SECONDCLICK6_SCROLLBAR_SLIDER: C2RustUnnamed_36 = 1106312;
pub const KEYC_SECONDCLICK6_SCROLLBAR_UP: C2RustUnnamed_36 = 1106311;
pub const KEYC_SECONDCLICK6_STATUS_DEFAULT: C2RustUnnamed_36 = 1106310;
pub const KEYC_SECONDCLICK6_STATUS_RIGHT: C2RustUnnamed_36 = 1106309;
pub const KEYC_SECONDCLICK6_STATUS_LEFT: C2RustUnnamed_36 = 1106308;
pub const KEYC_SECONDCLICK6_STATUS: C2RustUnnamed_36 = 1106307;
pub const KEYC_SECONDCLICK6_PANE: C2RustUnnamed_36 = 1106306;
pub const KEYC_SECONDCLICK3_BORDER: C2RustUnnamed_36 = 1106305;
pub const KEYC_SECONDCLICK3_SCROLLBAR_DOWN: C2RustUnnamed_36 = 1106304;
pub const KEYC_SECONDCLICK3_SCROLLBAR_SLIDER: C2RustUnnamed_36 = 1106303;
pub const KEYC_SECONDCLICK3_SCROLLBAR_UP: C2RustUnnamed_36 = 1106302;
pub const KEYC_SECONDCLICK3_STATUS_DEFAULT: C2RustUnnamed_36 = 1106301;
pub const KEYC_SECONDCLICK3_STATUS_RIGHT: C2RustUnnamed_36 = 1106300;
pub const KEYC_SECONDCLICK3_STATUS_LEFT: C2RustUnnamed_36 = 1106299;
pub const KEYC_SECONDCLICK3_STATUS: C2RustUnnamed_36 = 1106298;
pub const KEYC_SECONDCLICK3_PANE: C2RustUnnamed_36 = 1106297;
pub const KEYC_SECONDCLICK2_BORDER: C2RustUnnamed_36 = 1106296;
pub const KEYC_SECONDCLICK2_SCROLLBAR_DOWN: C2RustUnnamed_36 = 1106295;
pub const KEYC_SECONDCLICK2_SCROLLBAR_SLIDER: C2RustUnnamed_36 = 1106294;
pub const KEYC_SECONDCLICK2_SCROLLBAR_UP: C2RustUnnamed_36 = 1106293;
pub const KEYC_SECONDCLICK2_STATUS_DEFAULT: C2RustUnnamed_36 = 1106292;
pub const KEYC_SECONDCLICK2_STATUS_RIGHT: C2RustUnnamed_36 = 1106291;
pub const KEYC_SECONDCLICK2_STATUS_LEFT: C2RustUnnamed_36 = 1106290;
pub const KEYC_SECONDCLICK2_STATUS: C2RustUnnamed_36 = 1106289;
pub const KEYC_SECONDCLICK2_PANE: C2RustUnnamed_36 = 1106288;
pub const KEYC_SECONDCLICK1_BORDER: C2RustUnnamed_36 = 1106287;
pub const KEYC_SECONDCLICK1_SCROLLBAR_DOWN: C2RustUnnamed_36 = 1106286;
pub const KEYC_SECONDCLICK1_SCROLLBAR_SLIDER: C2RustUnnamed_36 = 1106285;
pub const KEYC_SECONDCLICK1_SCROLLBAR_UP: C2RustUnnamed_36 = 1106284;
pub const KEYC_SECONDCLICK1_STATUS_DEFAULT: C2RustUnnamed_36 = 1106283;
pub const KEYC_SECONDCLICK1_STATUS_RIGHT: C2RustUnnamed_36 = 1106282;
pub const KEYC_SECONDCLICK1_STATUS_LEFT: C2RustUnnamed_36 = 1106281;
pub const KEYC_SECONDCLICK1_STATUS: C2RustUnnamed_36 = 1106280;
pub const KEYC_SECONDCLICK1_PANE: C2RustUnnamed_36 = 1106279;
pub const KEYC_WHEELDOWN_BORDER: C2RustUnnamed_36 = 1106278;
pub const KEYC_WHEELDOWN_SCROLLBAR_DOWN: C2RustUnnamed_36 = 1106277;
pub const KEYC_WHEELDOWN_SCROLLBAR_SLIDER: C2RustUnnamed_36 = 1106276;
pub const KEYC_WHEELDOWN_SCROLLBAR_UP: C2RustUnnamed_36 = 1106275;
pub const KEYC_WHEELDOWN_STATUS_DEFAULT: C2RustUnnamed_36 = 1106274;
pub const KEYC_WHEELDOWN_STATUS_RIGHT: C2RustUnnamed_36 = 1106273;
pub const KEYC_WHEELDOWN_STATUS_LEFT: C2RustUnnamed_36 = 1106272;
pub const KEYC_WHEELDOWN_STATUS: C2RustUnnamed_36 = 1106271;
pub const KEYC_WHEELDOWN_PANE: C2RustUnnamed_36 = 1106270;
pub const KEYC_WHEELUP_BORDER: C2RustUnnamed_36 = 1106269;
pub const KEYC_WHEELUP_SCROLLBAR_DOWN: C2RustUnnamed_36 = 1106268;
pub const KEYC_WHEELUP_SCROLLBAR_SLIDER: C2RustUnnamed_36 = 1106267;
pub const KEYC_WHEELUP_SCROLLBAR_UP: C2RustUnnamed_36 = 1106266;
pub const KEYC_WHEELUP_STATUS_DEFAULT: C2RustUnnamed_36 = 1106265;
pub const KEYC_WHEELUP_STATUS_RIGHT: C2RustUnnamed_36 = 1106264;
pub const KEYC_WHEELUP_STATUS_LEFT: C2RustUnnamed_36 = 1106263;
pub const KEYC_WHEELUP_STATUS: C2RustUnnamed_36 = 1106262;
pub const KEYC_WHEELUP_PANE: C2RustUnnamed_36 = 1106261;
pub const KEYC_MOUSEDRAGEND11_BORDER: C2RustUnnamed_36 = 1106260;
pub const KEYC_MOUSEDRAGEND11_SCROLLBAR_DOWN: C2RustUnnamed_36 = 1106259;
pub const KEYC_MOUSEDRAGEND11_SCROLLBAR_SLIDER: C2RustUnnamed_36 = 1106258;
pub const KEYC_MOUSEDRAGEND11_SCROLLBAR_UP: C2RustUnnamed_36 = 1106257;
pub const KEYC_MOUSEDRAGEND11_STATUS_DEFAULT: C2RustUnnamed_36 = 1106256;
pub const KEYC_MOUSEDRAGEND11_STATUS_RIGHT: C2RustUnnamed_36 = 1106255;
pub const KEYC_MOUSEDRAGEND11_STATUS_LEFT: C2RustUnnamed_36 = 1106254;
pub const KEYC_MOUSEDRAGEND11_STATUS: C2RustUnnamed_36 = 1106253;
pub const KEYC_MOUSEDRAGEND11_PANE: C2RustUnnamed_36 = 1106252;
pub const KEYC_MOUSEDRAGEND10_BORDER: C2RustUnnamed_36 = 1106251;
pub const KEYC_MOUSEDRAGEND10_SCROLLBAR_DOWN: C2RustUnnamed_36 = 1106250;
pub const KEYC_MOUSEDRAGEND10_SCROLLBAR_SLIDER: C2RustUnnamed_36 = 1106249;
pub const KEYC_MOUSEDRAGEND10_SCROLLBAR_UP: C2RustUnnamed_36 = 1106248;
pub const KEYC_MOUSEDRAGEND10_STATUS_DEFAULT: C2RustUnnamed_36 = 1106247;
pub const KEYC_MOUSEDRAGEND10_STATUS_RIGHT: C2RustUnnamed_36 = 1106246;
pub const KEYC_MOUSEDRAGEND10_STATUS_LEFT: C2RustUnnamed_36 = 1106245;
pub const KEYC_MOUSEDRAGEND10_STATUS: C2RustUnnamed_36 = 1106244;
pub const KEYC_MOUSEDRAGEND10_PANE: C2RustUnnamed_36 = 1106243;
pub const KEYC_MOUSEDRAGEND9_BORDER: C2RustUnnamed_36 = 1106242;
pub const KEYC_MOUSEDRAGEND9_SCROLLBAR_DOWN: C2RustUnnamed_36 = 1106241;
pub const KEYC_MOUSEDRAGEND9_SCROLLBAR_SLIDER: C2RustUnnamed_36 = 1106240;
pub const KEYC_MOUSEDRAGEND9_SCROLLBAR_UP: C2RustUnnamed_36 = 1106239;
pub const KEYC_MOUSEDRAGEND9_STATUS_DEFAULT: C2RustUnnamed_36 = 1106238;
pub const KEYC_MOUSEDRAGEND9_STATUS_RIGHT: C2RustUnnamed_36 = 1106237;
pub const KEYC_MOUSEDRAGEND9_STATUS_LEFT: C2RustUnnamed_36 = 1106236;
pub const KEYC_MOUSEDRAGEND9_STATUS: C2RustUnnamed_36 = 1106235;
pub const KEYC_MOUSEDRAGEND9_PANE: C2RustUnnamed_36 = 1106234;
pub const KEYC_MOUSEDRAGEND8_BORDER: C2RustUnnamed_36 = 1106233;
pub const KEYC_MOUSEDRAGEND8_SCROLLBAR_DOWN: C2RustUnnamed_36 = 1106232;
pub const KEYC_MOUSEDRAGEND8_SCROLLBAR_SLIDER: C2RustUnnamed_36 = 1106231;
pub const KEYC_MOUSEDRAGEND8_SCROLLBAR_UP: C2RustUnnamed_36 = 1106230;
pub const KEYC_MOUSEDRAGEND8_STATUS_DEFAULT: C2RustUnnamed_36 = 1106229;
pub const KEYC_MOUSEDRAGEND8_STATUS_RIGHT: C2RustUnnamed_36 = 1106228;
pub const KEYC_MOUSEDRAGEND8_STATUS_LEFT: C2RustUnnamed_36 = 1106227;
pub const KEYC_MOUSEDRAGEND8_STATUS: C2RustUnnamed_36 = 1106226;
pub const KEYC_MOUSEDRAGEND8_PANE: C2RustUnnamed_36 = 1106225;
pub const KEYC_MOUSEDRAGEND7_BORDER: C2RustUnnamed_36 = 1106224;
pub const KEYC_MOUSEDRAGEND7_SCROLLBAR_DOWN: C2RustUnnamed_36 = 1106223;
pub const KEYC_MOUSEDRAGEND7_SCROLLBAR_SLIDER: C2RustUnnamed_36 = 1106222;
pub const KEYC_MOUSEDRAGEND7_SCROLLBAR_UP: C2RustUnnamed_36 = 1106221;
pub const KEYC_MOUSEDRAGEND7_STATUS_DEFAULT: C2RustUnnamed_36 = 1106220;
pub const KEYC_MOUSEDRAGEND7_STATUS_RIGHT: C2RustUnnamed_36 = 1106219;
pub const KEYC_MOUSEDRAGEND7_STATUS_LEFT: C2RustUnnamed_36 = 1106218;
pub const KEYC_MOUSEDRAGEND7_STATUS: C2RustUnnamed_36 = 1106217;
pub const KEYC_MOUSEDRAGEND7_PANE: C2RustUnnamed_36 = 1106216;
pub const KEYC_MOUSEDRAGEND6_BORDER: C2RustUnnamed_36 = 1106215;
pub const KEYC_MOUSEDRAGEND6_SCROLLBAR_DOWN: C2RustUnnamed_36 = 1106214;
pub const KEYC_MOUSEDRAGEND6_SCROLLBAR_SLIDER: C2RustUnnamed_36 = 1106213;
pub const KEYC_MOUSEDRAGEND6_SCROLLBAR_UP: C2RustUnnamed_36 = 1106212;
pub const KEYC_MOUSEDRAGEND6_STATUS_DEFAULT: C2RustUnnamed_36 = 1106211;
pub const KEYC_MOUSEDRAGEND6_STATUS_RIGHT: C2RustUnnamed_36 = 1106210;
pub const KEYC_MOUSEDRAGEND6_STATUS_LEFT: C2RustUnnamed_36 = 1106209;
pub const KEYC_MOUSEDRAGEND6_STATUS: C2RustUnnamed_36 = 1106208;
pub const KEYC_MOUSEDRAGEND6_PANE: C2RustUnnamed_36 = 1106207;
pub const KEYC_MOUSEDRAGEND3_BORDER: C2RustUnnamed_36 = 1106206;
pub const KEYC_MOUSEDRAGEND3_SCROLLBAR_DOWN: C2RustUnnamed_36 = 1106205;
pub const KEYC_MOUSEDRAGEND3_SCROLLBAR_SLIDER: C2RustUnnamed_36 = 1106204;
pub const KEYC_MOUSEDRAGEND3_SCROLLBAR_UP: C2RustUnnamed_36 = 1106203;
pub const KEYC_MOUSEDRAGEND3_STATUS_DEFAULT: C2RustUnnamed_36 = 1106202;
pub const KEYC_MOUSEDRAGEND3_STATUS_RIGHT: C2RustUnnamed_36 = 1106201;
pub const KEYC_MOUSEDRAGEND3_STATUS_LEFT: C2RustUnnamed_36 = 1106200;
pub const KEYC_MOUSEDRAGEND3_STATUS: C2RustUnnamed_36 = 1106199;
pub const KEYC_MOUSEDRAGEND3_PANE: C2RustUnnamed_36 = 1106198;
pub const KEYC_MOUSEDRAGEND2_BORDER: C2RustUnnamed_36 = 1106197;
pub const KEYC_MOUSEDRAGEND2_SCROLLBAR_DOWN: C2RustUnnamed_36 = 1106196;
pub const KEYC_MOUSEDRAGEND2_SCROLLBAR_SLIDER: C2RustUnnamed_36 = 1106195;
pub const KEYC_MOUSEDRAGEND2_SCROLLBAR_UP: C2RustUnnamed_36 = 1106194;
pub const KEYC_MOUSEDRAGEND2_STATUS_DEFAULT: C2RustUnnamed_36 = 1106193;
pub const KEYC_MOUSEDRAGEND2_STATUS_RIGHT: C2RustUnnamed_36 = 1106192;
pub const KEYC_MOUSEDRAGEND2_STATUS_LEFT: C2RustUnnamed_36 = 1106191;
pub const KEYC_MOUSEDRAGEND2_STATUS: C2RustUnnamed_36 = 1106190;
pub const KEYC_MOUSEDRAGEND2_PANE: C2RustUnnamed_36 = 1106189;
pub const KEYC_MOUSEDRAGEND1_BORDER: C2RustUnnamed_36 = 1106188;
pub const KEYC_MOUSEDRAGEND1_SCROLLBAR_DOWN: C2RustUnnamed_36 = 1106187;
pub const KEYC_MOUSEDRAGEND1_SCROLLBAR_SLIDER: C2RustUnnamed_36 = 1106186;
pub const KEYC_MOUSEDRAGEND1_SCROLLBAR_UP: C2RustUnnamed_36 = 1106185;
pub const KEYC_MOUSEDRAGEND1_STATUS_DEFAULT: C2RustUnnamed_36 = 1106184;
pub const KEYC_MOUSEDRAGEND1_STATUS_RIGHT: C2RustUnnamed_36 = 1106183;
pub const KEYC_MOUSEDRAGEND1_STATUS_LEFT: C2RustUnnamed_36 = 1106182;
pub const KEYC_MOUSEDRAGEND1_STATUS: C2RustUnnamed_36 = 1106181;
pub const KEYC_MOUSEDRAGEND1_PANE: C2RustUnnamed_36 = 1106180;
pub const KEYC_MOUSEDRAG11_BORDER: C2RustUnnamed_36 = 1106179;
pub const KEYC_MOUSEDRAG11_SCROLLBAR_DOWN: C2RustUnnamed_36 = 1106178;
pub const KEYC_MOUSEDRAG11_SCROLLBAR_SLIDER: C2RustUnnamed_36 = 1106177;
pub const KEYC_MOUSEDRAG11_SCROLLBAR_UP: C2RustUnnamed_36 = 1106176;
pub const KEYC_MOUSEDRAG11_STATUS_DEFAULT: C2RustUnnamed_36 = 1106175;
pub const KEYC_MOUSEDRAG11_STATUS_RIGHT: C2RustUnnamed_36 = 1106174;
pub const KEYC_MOUSEDRAG11_STATUS_LEFT: C2RustUnnamed_36 = 1106173;
pub const KEYC_MOUSEDRAG11_STATUS: C2RustUnnamed_36 = 1106172;
pub const KEYC_MOUSEDRAG11_PANE: C2RustUnnamed_36 = 1106171;
pub const KEYC_MOUSEDRAG10_BORDER: C2RustUnnamed_36 = 1106170;
pub const KEYC_MOUSEDRAG10_SCROLLBAR_DOWN: C2RustUnnamed_36 = 1106169;
pub const KEYC_MOUSEDRAG10_SCROLLBAR_SLIDER: C2RustUnnamed_36 = 1106168;
pub const KEYC_MOUSEDRAG10_SCROLLBAR_UP: C2RustUnnamed_36 = 1106167;
pub const KEYC_MOUSEDRAG10_STATUS_DEFAULT: C2RustUnnamed_36 = 1106166;
pub const KEYC_MOUSEDRAG10_STATUS_RIGHT: C2RustUnnamed_36 = 1106165;
pub const KEYC_MOUSEDRAG10_STATUS_LEFT: C2RustUnnamed_36 = 1106164;
pub const KEYC_MOUSEDRAG10_STATUS: C2RustUnnamed_36 = 1106163;
pub const KEYC_MOUSEDRAG10_PANE: C2RustUnnamed_36 = 1106162;
pub const KEYC_MOUSEDRAG9_BORDER: C2RustUnnamed_36 = 1106161;
pub const KEYC_MOUSEDRAG9_SCROLLBAR_DOWN: C2RustUnnamed_36 = 1106160;
pub const KEYC_MOUSEDRAG9_SCROLLBAR_SLIDER: C2RustUnnamed_36 = 1106159;
pub const KEYC_MOUSEDRAG9_SCROLLBAR_UP: C2RustUnnamed_36 = 1106158;
pub const KEYC_MOUSEDRAG9_STATUS_DEFAULT: C2RustUnnamed_36 = 1106157;
pub const KEYC_MOUSEDRAG9_STATUS_RIGHT: C2RustUnnamed_36 = 1106156;
pub const KEYC_MOUSEDRAG9_STATUS_LEFT: C2RustUnnamed_36 = 1106155;
pub const KEYC_MOUSEDRAG9_STATUS: C2RustUnnamed_36 = 1106154;
pub const KEYC_MOUSEDRAG9_PANE: C2RustUnnamed_36 = 1106153;
pub const KEYC_MOUSEDRAG8_BORDER: C2RustUnnamed_36 = 1106152;
pub const KEYC_MOUSEDRAG8_SCROLLBAR_DOWN: C2RustUnnamed_36 = 1106151;
pub const KEYC_MOUSEDRAG8_SCROLLBAR_SLIDER: C2RustUnnamed_36 = 1106150;
pub const KEYC_MOUSEDRAG8_SCROLLBAR_UP: C2RustUnnamed_36 = 1106149;
pub const KEYC_MOUSEDRAG8_STATUS_DEFAULT: C2RustUnnamed_36 = 1106148;
pub const KEYC_MOUSEDRAG8_STATUS_RIGHT: C2RustUnnamed_36 = 1106147;
pub const KEYC_MOUSEDRAG8_STATUS_LEFT: C2RustUnnamed_36 = 1106146;
pub const KEYC_MOUSEDRAG8_STATUS: C2RustUnnamed_36 = 1106145;
pub const KEYC_MOUSEDRAG8_PANE: C2RustUnnamed_36 = 1106144;
pub const KEYC_MOUSEDRAG7_BORDER: C2RustUnnamed_36 = 1106143;
pub const KEYC_MOUSEDRAG7_SCROLLBAR_DOWN: C2RustUnnamed_36 = 1106142;
pub const KEYC_MOUSEDRAG7_SCROLLBAR_SLIDER: C2RustUnnamed_36 = 1106141;
pub const KEYC_MOUSEDRAG7_SCROLLBAR_UP: C2RustUnnamed_36 = 1106140;
pub const KEYC_MOUSEDRAG7_STATUS_DEFAULT: C2RustUnnamed_36 = 1106139;
pub const KEYC_MOUSEDRAG7_STATUS_RIGHT: C2RustUnnamed_36 = 1106138;
pub const KEYC_MOUSEDRAG7_STATUS_LEFT: C2RustUnnamed_36 = 1106137;
pub const KEYC_MOUSEDRAG7_STATUS: C2RustUnnamed_36 = 1106136;
pub const KEYC_MOUSEDRAG7_PANE: C2RustUnnamed_36 = 1106135;
pub const KEYC_MOUSEDRAG6_BORDER: C2RustUnnamed_36 = 1106134;
pub const KEYC_MOUSEDRAG6_SCROLLBAR_DOWN: C2RustUnnamed_36 = 1106133;
pub const KEYC_MOUSEDRAG6_SCROLLBAR_SLIDER: C2RustUnnamed_36 = 1106132;
pub const KEYC_MOUSEDRAG6_SCROLLBAR_UP: C2RustUnnamed_36 = 1106131;
pub const KEYC_MOUSEDRAG6_STATUS_DEFAULT: C2RustUnnamed_36 = 1106130;
pub const KEYC_MOUSEDRAG6_STATUS_RIGHT: C2RustUnnamed_36 = 1106129;
pub const KEYC_MOUSEDRAG6_STATUS_LEFT: C2RustUnnamed_36 = 1106128;
pub const KEYC_MOUSEDRAG6_STATUS: C2RustUnnamed_36 = 1106127;
pub const KEYC_MOUSEDRAG6_PANE: C2RustUnnamed_36 = 1106126;
pub const KEYC_MOUSEDRAG3_BORDER: C2RustUnnamed_36 = 1106125;
pub const KEYC_MOUSEDRAG3_SCROLLBAR_DOWN: C2RustUnnamed_36 = 1106124;
pub const KEYC_MOUSEDRAG3_SCROLLBAR_SLIDER: C2RustUnnamed_36 = 1106123;
pub const KEYC_MOUSEDRAG3_SCROLLBAR_UP: C2RustUnnamed_36 = 1106122;
pub const KEYC_MOUSEDRAG3_STATUS_DEFAULT: C2RustUnnamed_36 = 1106121;
pub const KEYC_MOUSEDRAG3_STATUS_RIGHT: C2RustUnnamed_36 = 1106120;
pub const KEYC_MOUSEDRAG3_STATUS_LEFT: C2RustUnnamed_36 = 1106119;
pub const KEYC_MOUSEDRAG3_STATUS: C2RustUnnamed_36 = 1106118;
pub const KEYC_MOUSEDRAG3_PANE: C2RustUnnamed_36 = 1106117;
pub const KEYC_MOUSEDRAG2_BORDER: C2RustUnnamed_36 = 1106116;
pub const KEYC_MOUSEDRAG2_SCROLLBAR_DOWN: C2RustUnnamed_36 = 1106115;
pub const KEYC_MOUSEDRAG2_SCROLLBAR_SLIDER: C2RustUnnamed_36 = 1106114;
pub const KEYC_MOUSEDRAG2_SCROLLBAR_UP: C2RustUnnamed_36 = 1106113;
pub const KEYC_MOUSEDRAG2_STATUS_DEFAULT: C2RustUnnamed_36 = 1106112;
pub const KEYC_MOUSEDRAG2_STATUS_RIGHT: C2RustUnnamed_36 = 1106111;
pub const KEYC_MOUSEDRAG2_STATUS_LEFT: C2RustUnnamed_36 = 1106110;
pub const KEYC_MOUSEDRAG2_STATUS: C2RustUnnamed_36 = 1106109;
pub const KEYC_MOUSEDRAG2_PANE: C2RustUnnamed_36 = 1106108;
pub const KEYC_MOUSEDRAG1_BORDER: C2RustUnnamed_36 = 1106107;
pub const KEYC_MOUSEDRAG1_SCROLLBAR_DOWN: C2RustUnnamed_36 = 1106106;
pub const KEYC_MOUSEDRAG1_SCROLLBAR_SLIDER: C2RustUnnamed_36 = 1106105;
pub const KEYC_MOUSEDRAG1_SCROLLBAR_UP: C2RustUnnamed_36 = 1106104;
pub const KEYC_MOUSEDRAG1_STATUS_DEFAULT: C2RustUnnamed_36 = 1106103;
pub const KEYC_MOUSEDRAG1_STATUS_RIGHT: C2RustUnnamed_36 = 1106102;
pub const KEYC_MOUSEDRAG1_STATUS_LEFT: C2RustUnnamed_36 = 1106101;
pub const KEYC_MOUSEDRAG1_STATUS: C2RustUnnamed_36 = 1106100;
pub const KEYC_MOUSEDRAG1_PANE: C2RustUnnamed_36 = 1106099;
pub const KEYC_MOUSEUP11_BORDER: C2RustUnnamed_36 = 1106098;
pub const KEYC_MOUSEUP11_SCROLLBAR_DOWN: C2RustUnnamed_36 = 1106097;
pub const KEYC_MOUSEUP11_SCROLLBAR_SLIDER: C2RustUnnamed_36 = 1106096;
pub const KEYC_MOUSEUP11_SCROLLBAR_UP: C2RustUnnamed_36 = 1106095;
pub const KEYC_MOUSEUP11_STATUS_DEFAULT: C2RustUnnamed_36 = 1106094;
pub const KEYC_MOUSEUP11_STATUS_RIGHT: C2RustUnnamed_36 = 1106093;
pub const KEYC_MOUSEUP11_STATUS_LEFT: C2RustUnnamed_36 = 1106092;
pub const KEYC_MOUSEUP11_STATUS: C2RustUnnamed_36 = 1106091;
pub const KEYC_MOUSEUP11_PANE: C2RustUnnamed_36 = 1106090;
pub const KEYC_MOUSEUP10_BORDER: C2RustUnnamed_36 = 1106089;
pub const KEYC_MOUSEUP10_SCROLLBAR_DOWN: C2RustUnnamed_36 = 1106088;
pub const KEYC_MOUSEUP10_SCROLLBAR_SLIDER: C2RustUnnamed_36 = 1106087;
pub const KEYC_MOUSEUP10_SCROLLBAR_UP: C2RustUnnamed_36 = 1106086;
pub const KEYC_MOUSEUP10_STATUS_DEFAULT: C2RustUnnamed_36 = 1106085;
pub const KEYC_MOUSEUP10_STATUS_RIGHT: C2RustUnnamed_36 = 1106084;
pub const KEYC_MOUSEUP10_STATUS_LEFT: C2RustUnnamed_36 = 1106083;
pub const KEYC_MOUSEUP10_STATUS: C2RustUnnamed_36 = 1106082;
pub const KEYC_MOUSEUP10_PANE: C2RustUnnamed_36 = 1106081;
pub const KEYC_MOUSEUP9_BORDER: C2RustUnnamed_36 = 1106080;
pub const KEYC_MOUSEUP9_SCROLLBAR_DOWN: C2RustUnnamed_36 = 1106079;
pub const KEYC_MOUSEUP9_SCROLLBAR_SLIDER: C2RustUnnamed_36 = 1106078;
pub const KEYC_MOUSEUP9_SCROLLBAR_UP: C2RustUnnamed_36 = 1106077;
pub const KEYC_MOUSEUP9_STATUS_DEFAULT: C2RustUnnamed_36 = 1106076;
pub const KEYC_MOUSEUP9_STATUS_RIGHT: C2RustUnnamed_36 = 1106075;
pub const KEYC_MOUSEUP9_STATUS_LEFT: C2RustUnnamed_36 = 1106074;
pub const KEYC_MOUSEUP9_STATUS: C2RustUnnamed_36 = 1106073;
pub const KEYC_MOUSEUP9_PANE: C2RustUnnamed_36 = 1106072;
pub const KEYC_MOUSEUP8_BORDER: C2RustUnnamed_36 = 1106071;
pub const KEYC_MOUSEUP8_SCROLLBAR_DOWN: C2RustUnnamed_36 = 1106070;
pub const KEYC_MOUSEUP8_SCROLLBAR_SLIDER: C2RustUnnamed_36 = 1106069;
pub const KEYC_MOUSEUP8_SCROLLBAR_UP: C2RustUnnamed_36 = 1106068;
pub const KEYC_MOUSEUP8_STATUS_DEFAULT: C2RustUnnamed_36 = 1106067;
pub const KEYC_MOUSEUP8_STATUS_RIGHT: C2RustUnnamed_36 = 1106066;
pub const KEYC_MOUSEUP8_STATUS_LEFT: C2RustUnnamed_36 = 1106065;
pub const KEYC_MOUSEUP8_STATUS: C2RustUnnamed_36 = 1106064;
pub const KEYC_MOUSEUP8_PANE: C2RustUnnamed_36 = 1106063;
pub const KEYC_MOUSEUP7_BORDER: C2RustUnnamed_36 = 1106062;
pub const KEYC_MOUSEUP7_SCROLLBAR_DOWN: C2RustUnnamed_36 = 1106061;
pub const KEYC_MOUSEUP7_SCROLLBAR_SLIDER: C2RustUnnamed_36 = 1106060;
pub const KEYC_MOUSEUP7_SCROLLBAR_UP: C2RustUnnamed_36 = 1106059;
pub const KEYC_MOUSEUP7_STATUS_DEFAULT: C2RustUnnamed_36 = 1106058;
pub const KEYC_MOUSEUP7_STATUS_RIGHT: C2RustUnnamed_36 = 1106057;
pub const KEYC_MOUSEUP7_STATUS_LEFT: C2RustUnnamed_36 = 1106056;
pub const KEYC_MOUSEUP7_STATUS: C2RustUnnamed_36 = 1106055;
pub const KEYC_MOUSEUP7_PANE: C2RustUnnamed_36 = 1106054;
pub const KEYC_MOUSEUP6_BORDER: C2RustUnnamed_36 = 1106053;
pub const KEYC_MOUSEUP6_SCROLLBAR_DOWN: C2RustUnnamed_36 = 1106052;
pub const KEYC_MOUSEUP6_SCROLLBAR_SLIDER: C2RustUnnamed_36 = 1106051;
pub const KEYC_MOUSEUP6_SCROLLBAR_UP: C2RustUnnamed_36 = 1106050;
pub const KEYC_MOUSEUP6_STATUS_DEFAULT: C2RustUnnamed_36 = 1106049;
pub const KEYC_MOUSEUP6_STATUS_RIGHT: C2RustUnnamed_36 = 1106048;
pub const KEYC_MOUSEUP6_STATUS_LEFT: C2RustUnnamed_36 = 1106047;
pub const KEYC_MOUSEUP6_STATUS: C2RustUnnamed_36 = 1106046;
pub const KEYC_MOUSEUP6_PANE: C2RustUnnamed_36 = 1106045;
pub const KEYC_MOUSEUP3_BORDER: C2RustUnnamed_36 = 1106044;
pub const KEYC_MOUSEUP3_SCROLLBAR_DOWN: C2RustUnnamed_36 = 1106043;
pub const KEYC_MOUSEUP3_SCROLLBAR_SLIDER: C2RustUnnamed_36 = 1106042;
pub const KEYC_MOUSEUP3_SCROLLBAR_UP: C2RustUnnamed_36 = 1106041;
pub const KEYC_MOUSEUP3_STATUS_DEFAULT: C2RustUnnamed_36 = 1106040;
pub const KEYC_MOUSEUP3_STATUS_RIGHT: C2RustUnnamed_36 = 1106039;
pub const KEYC_MOUSEUP3_STATUS_LEFT: C2RustUnnamed_36 = 1106038;
pub const KEYC_MOUSEUP3_STATUS: C2RustUnnamed_36 = 1106037;
pub const KEYC_MOUSEUP3_PANE: C2RustUnnamed_36 = 1106036;
pub const KEYC_MOUSEUP2_BORDER: C2RustUnnamed_36 = 1106035;
pub const KEYC_MOUSEUP2_SCROLLBAR_DOWN: C2RustUnnamed_36 = 1106034;
pub const KEYC_MOUSEUP2_SCROLLBAR_SLIDER: C2RustUnnamed_36 = 1106033;
pub const KEYC_MOUSEUP2_SCROLLBAR_UP: C2RustUnnamed_36 = 1106032;
pub const KEYC_MOUSEUP2_STATUS_DEFAULT: C2RustUnnamed_36 = 1106031;
pub const KEYC_MOUSEUP2_STATUS_RIGHT: C2RustUnnamed_36 = 1106030;
pub const KEYC_MOUSEUP2_STATUS_LEFT: C2RustUnnamed_36 = 1106029;
pub const KEYC_MOUSEUP2_STATUS: C2RustUnnamed_36 = 1106028;
pub const KEYC_MOUSEUP2_PANE: C2RustUnnamed_36 = 1106027;
pub const KEYC_MOUSEUP1_BORDER: C2RustUnnamed_36 = 1106026;
pub const KEYC_MOUSEUP1_SCROLLBAR_DOWN: C2RustUnnamed_36 = 1106025;
pub const KEYC_MOUSEUP1_SCROLLBAR_SLIDER: C2RustUnnamed_36 = 1106024;
pub const KEYC_MOUSEUP1_SCROLLBAR_UP: C2RustUnnamed_36 = 1106023;
pub const KEYC_MOUSEUP1_STATUS_DEFAULT: C2RustUnnamed_36 = 1106022;
pub const KEYC_MOUSEUP1_STATUS_RIGHT: C2RustUnnamed_36 = 1106021;
pub const KEYC_MOUSEUP1_STATUS_LEFT: C2RustUnnamed_36 = 1106020;
pub const KEYC_MOUSEUP1_STATUS: C2RustUnnamed_36 = 1106019;
pub const KEYC_MOUSEUP1_PANE: C2RustUnnamed_36 = 1106018;
pub const KEYC_MOUSEDOWN11_BORDER: C2RustUnnamed_36 = 1106017;
pub const KEYC_MOUSEDOWN11_SCROLLBAR_DOWN: C2RustUnnamed_36 = 1106016;
pub const KEYC_MOUSEDOWN11_SCROLLBAR_SLIDER: C2RustUnnamed_36 = 1106015;
pub const KEYC_MOUSEDOWN11_SCROLLBAR_UP: C2RustUnnamed_36 = 1106014;
pub const KEYC_MOUSEDOWN11_STATUS_DEFAULT: C2RustUnnamed_36 = 1106013;
pub const KEYC_MOUSEDOWN11_STATUS_RIGHT: C2RustUnnamed_36 = 1106012;
pub const KEYC_MOUSEDOWN11_STATUS_LEFT: C2RustUnnamed_36 = 1106011;
pub const KEYC_MOUSEDOWN11_STATUS: C2RustUnnamed_36 = 1106010;
pub const KEYC_MOUSEDOWN11_PANE: C2RustUnnamed_36 = 1106009;
pub const KEYC_MOUSEDOWN10_BORDER: C2RustUnnamed_36 = 1106008;
pub const KEYC_MOUSEDOWN10_SCROLLBAR_DOWN: C2RustUnnamed_36 = 1106007;
pub const KEYC_MOUSEDOWN10_SCROLLBAR_SLIDER: C2RustUnnamed_36 = 1106006;
pub const KEYC_MOUSEDOWN10_SCROLLBAR_UP: C2RustUnnamed_36 = 1106005;
pub const KEYC_MOUSEDOWN10_STATUS_DEFAULT: C2RustUnnamed_36 = 1106004;
pub const KEYC_MOUSEDOWN10_STATUS_RIGHT: C2RustUnnamed_36 = 1106003;
pub const KEYC_MOUSEDOWN10_STATUS_LEFT: C2RustUnnamed_36 = 1106002;
pub const KEYC_MOUSEDOWN10_STATUS: C2RustUnnamed_36 = 1106001;
pub const KEYC_MOUSEDOWN10_PANE: C2RustUnnamed_36 = 1106000;
pub const KEYC_MOUSEDOWN9_BORDER: C2RustUnnamed_36 = 1105999;
pub const KEYC_MOUSEDOWN9_SCROLLBAR_DOWN: C2RustUnnamed_36 = 1105998;
pub const KEYC_MOUSEDOWN9_SCROLLBAR_SLIDER: C2RustUnnamed_36 = 1105997;
pub const KEYC_MOUSEDOWN9_SCROLLBAR_UP: C2RustUnnamed_36 = 1105996;
pub const KEYC_MOUSEDOWN9_STATUS_DEFAULT: C2RustUnnamed_36 = 1105995;
pub const KEYC_MOUSEDOWN9_STATUS_RIGHT: C2RustUnnamed_36 = 1105994;
pub const KEYC_MOUSEDOWN9_STATUS_LEFT: C2RustUnnamed_36 = 1105993;
pub const KEYC_MOUSEDOWN9_STATUS: C2RustUnnamed_36 = 1105992;
pub const KEYC_MOUSEDOWN9_PANE: C2RustUnnamed_36 = 1105991;
pub const KEYC_MOUSEDOWN8_BORDER: C2RustUnnamed_36 = 1105990;
pub const KEYC_MOUSEDOWN8_SCROLLBAR_DOWN: C2RustUnnamed_36 = 1105989;
pub const KEYC_MOUSEDOWN8_SCROLLBAR_SLIDER: C2RustUnnamed_36 = 1105988;
pub const KEYC_MOUSEDOWN8_SCROLLBAR_UP: C2RustUnnamed_36 = 1105987;
pub const KEYC_MOUSEDOWN8_STATUS_DEFAULT: C2RustUnnamed_36 = 1105986;
pub const KEYC_MOUSEDOWN8_STATUS_RIGHT: C2RustUnnamed_36 = 1105985;
pub const KEYC_MOUSEDOWN8_STATUS_LEFT: C2RustUnnamed_36 = 1105984;
pub const KEYC_MOUSEDOWN8_STATUS: C2RustUnnamed_36 = 1105983;
pub const KEYC_MOUSEDOWN8_PANE: C2RustUnnamed_36 = 1105982;
pub const KEYC_MOUSEDOWN7_BORDER: C2RustUnnamed_36 = 1105981;
pub const KEYC_MOUSEDOWN7_SCROLLBAR_DOWN: C2RustUnnamed_36 = 1105980;
pub const KEYC_MOUSEDOWN7_SCROLLBAR_SLIDER: C2RustUnnamed_36 = 1105979;
pub const KEYC_MOUSEDOWN7_SCROLLBAR_UP: C2RustUnnamed_36 = 1105978;
pub const KEYC_MOUSEDOWN7_STATUS_DEFAULT: C2RustUnnamed_36 = 1105977;
pub const KEYC_MOUSEDOWN7_STATUS_RIGHT: C2RustUnnamed_36 = 1105976;
pub const KEYC_MOUSEDOWN7_STATUS_LEFT: C2RustUnnamed_36 = 1105975;
pub const KEYC_MOUSEDOWN7_STATUS: C2RustUnnamed_36 = 1105974;
pub const KEYC_MOUSEDOWN7_PANE: C2RustUnnamed_36 = 1105973;
pub const KEYC_MOUSEDOWN6_BORDER: C2RustUnnamed_36 = 1105972;
pub const KEYC_MOUSEDOWN6_SCROLLBAR_DOWN: C2RustUnnamed_36 = 1105971;
pub const KEYC_MOUSEDOWN6_SCROLLBAR_SLIDER: C2RustUnnamed_36 = 1105970;
pub const KEYC_MOUSEDOWN6_SCROLLBAR_UP: C2RustUnnamed_36 = 1105969;
pub const KEYC_MOUSEDOWN6_STATUS_DEFAULT: C2RustUnnamed_36 = 1105968;
pub const KEYC_MOUSEDOWN6_STATUS_RIGHT: C2RustUnnamed_36 = 1105967;
pub const KEYC_MOUSEDOWN6_STATUS_LEFT: C2RustUnnamed_36 = 1105966;
pub const KEYC_MOUSEDOWN6_STATUS: C2RustUnnamed_36 = 1105965;
pub const KEYC_MOUSEDOWN6_PANE: C2RustUnnamed_36 = 1105964;
pub const KEYC_MOUSEDOWN3_BORDER: C2RustUnnamed_36 = 1105963;
pub const KEYC_MOUSEDOWN3_SCROLLBAR_DOWN: C2RustUnnamed_36 = 1105962;
pub const KEYC_MOUSEDOWN3_SCROLLBAR_SLIDER: C2RustUnnamed_36 = 1105961;
pub const KEYC_MOUSEDOWN3_SCROLLBAR_UP: C2RustUnnamed_36 = 1105960;
pub const KEYC_MOUSEDOWN3_STATUS_DEFAULT: C2RustUnnamed_36 = 1105959;
pub const KEYC_MOUSEDOWN3_STATUS_RIGHT: C2RustUnnamed_36 = 1105958;
pub const KEYC_MOUSEDOWN3_STATUS_LEFT: C2RustUnnamed_36 = 1105957;
pub const KEYC_MOUSEDOWN3_STATUS: C2RustUnnamed_36 = 1105956;
pub const KEYC_MOUSEDOWN3_PANE: C2RustUnnamed_36 = 1105955;
pub const KEYC_MOUSEDOWN2_BORDER: C2RustUnnamed_36 = 1105954;
pub const KEYC_MOUSEDOWN2_SCROLLBAR_DOWN: C2RustUnnamed_36 = 1105953;
pub const KEYC_MOUSEDOWN2_SCROLLBAR_SLIDER: C2RustUnnamed_36 = 1105952;
pub const KEYC_MOUSEDOWN2_SCROLLBAR_UP: C2RustUnnamed_36 = 1105951;
pub const KEYC_MOUSEDOWN2_STATUS_DEFAULT: C2RustUnnamed_36 = 1105950;
pub const KEYC_MOUSEDOWN2_STATUS_RIGHT: C2RustUnnamed_36 = 1105949;
pub const KEYC_MOUSEDOWN2_STATUS_LEFT: C2RustUnnamed_36 = 1105948;
pub const KEYC_MOUSEDOWN2_STATUS: C2RustUnnamed_36 = 1105947;
pub const KEYC_MOUSEDOWN2_PANE: C2RustUnnamed_36 = 1105946;
pub const KEYC_MOUSEDOWN1_BORDER: C2RustUnnamed_36 = 1105945;
pub const KEYC_MOUSEDOWN1_SCROLLBAR_DOWN: C2RustUnnamed_36 = 1105944;
pub const KEYC_MOUSEDOWN1_SCROLLBAR_SLIDER: C2RustUnnamed_36 = 1105943;
pub const KEYC_MOUSEDOWN1_SCROLLBAR_UP: C2RustUnnamed_36 = 1105942;
pub const KEYC_MOUSEDOWN1_STATUS_DEFAULT: C2RustUnnamed_36 = 1105941;
pub const KEYC_MOUSEDOWN1_STATUS_RIGHT: C2RustUnnamed_36 = 1105940;
pub const KEYC_MOUSEDOWN1_STATUS_LEFT: C2RustUnnamed_36 = 1105939;
pub const KEYC_MOUSEDOWN1_STATUS: C2RustUnnamed_36 = 1105938;
pub const KEYC_MOUSEDOWN1_PANE: C2RustUnnamed_36 = 1105937;
pub const KEYC_MOUSEMOVE_BORDER: C2RustUnnamed_36 = 1105936;
pub const KEYC_MOUSEMOVE_SCROLLBAR_DOWN: C2RustUnnamed_36 = 1105935;
pub const KEYC_MOUSEMOVE_SCROLLBAR_SLIDER: C2RustUnnamed_36 = 1105934;
pub const KEYC_MOUSEMOVE_SCROLLBAR_UP: C2RustUnnamed_36 = 1105933;
pub const KEYC_MOUSEMOVE_STATUS_DEFAULT: C2RustUnnamed_36 = 1105932;
pub const KEYC_MOUSEMOVE_STATUS_RIGHT: C2RustUnnamed_36 = 1105931;
pub const KEYC_MOUSEMOVE_STATUS_LEFT: C2RustUnnamed_36 = 1105930;
pub const KEYC_MOUSEMOVE_STATUS: C2RustUnnamed_36 = 1105929;
pub const KEYC_MOUSEMOVE_PANE: C2RustUnnamed_36 = 1105928;
pub const KEYC_DOUBLECLICK: C2RustUnnamed_36 = 1105927;
pub const KEYC_DRAGGING: C2RustUnnamed_36 = 1105926;
pub const KEYC_MOUSE: C2RustUnnamed_36 = 1105925;
pub const KEYC_PASTE_END: C2RustUnnamed_36 = 1105924;
pub const KEYC_PASTE_START: C2RustUnnamed_36 = 1105923;
pub const KEYC_ANY: C2RustUnnamed_36 = 1105922;
pub const KEYC_FOCUS_OUT: C2RustUnnamed_36 = 1105921;
pub const KEYC_FOCUS_IN: C2RustUnnamed_36 = 1105920;
pub type tty_code_code = u32;
pub const TTYC_XT: tty_code_code = 231;
pub const TTYC_VPA: tty_code_code = 230;
pub const TTYC_U8: tty_code_code = 229;
pub const TTYC_TSL: tty_code_code = 228;
pub const TTYC_TC: tty_code_code = 227;
pub const TTYC_SYNC: tty_code_code = 226;
pub const TTYC_SWD: tty_code_code = 225;
pub const TTYC_SS: tty_code_code = 224;
pub const TTYC_SXL: tty_code_code = 223;
pub const TTYC_SMXX: tty_code_code = 222;
pub const TTYC_SMULX: tty_code_code = 221;
pub const TTYC_SMUL: tty_code_code = 220;
pub const TTYC_SMSO: tty_code_code = 219;
pub const TTYC_SMOL: tty_code_code = 218;
pub const TTYC_SMKX: tty_code_code = 217;
pub const TTYC_SMCUP: tty_code_code = 216;
pub const TTYC_SMACS: tty_code_code = 215;
pub const TTYC_SITM: tty_code_code = 214;
pub const TTYC_SGR0: tty_code_code = 213;
pub const TTYC_SETULC1: tty_code_code = 212;
pub const TTYC_SETULC: tty_code_code = 211;
pub const TTYC_SETRGBF: tty_code_code = 210;
pub const TTYC_SETRGBB: tty_code_code = 209;
pub const TTYC_SETAL: tty_code_code = 208;
pub const TTYC_SETAF: tty_code_code = 207;
pub const TTYC_SETAB: tty_code_code = 206;
pub const TTYC_SE: tty_code_code = 205;
pub const TTYC_RMKX: tty_code_code = 204;
pub const TTYC_RMCUP: tty_code_code = 203;
pub const TTYC_RMACS: tty_code_code = 202;
pub const TTYC_RIN: tty_code_code = 201;
pub const TTYC_RI: tty_code_code = 200;
pub const TTYC_RGB: tty_code_code = 199;
pub const TTYC_REV: tty_code_code = 198;
pub const TTYC_RECT: tty_code_code = 197;
pub const TTYC_OP: tty_code_code = 196;
pub const TTYC_OL: tty_code_code = 195;
pub const TTYC_NOBR: tty_code_code = 194;
pub const TTYC_MS: tty_code_code = 193;
pub const TTYC_KUP7: tty_code_code = 192;
pub const TTYC_KUP6: tty_code_code = 191;
pub const TTYC_KUP5: tty_code_code = 190;
pub const TTYC_KUP4: tty_code_code = 189;
pub const TTYC_KUP3: tty_code_code = 188;
pub const TTYC_KUP2: tty_code_code = 187;
pub const TTYC_KRIT7: tty_code_code = 186;
pub const TTYC_KRIT6: tty_code_code = 185;
pub const TTYC_KRIT5: tty_code_code = 184;
pub const TTYC_KRIT4: tty_code_code = 183;
pub const TTYC_KRIT3: tty_code_code = 182;
pub const TTYC_KRIT2: tty_code_code = 181;
pub const TTYC_KRI: tty_code_code = 180;
pub const TTYC_KPRV7: tty_code_code = 179;
pub const TTYC_KPRV6: tty_code_code = 178;
pub const TTYC_KPRV5: tty_code_code = 177;
pub const TTYC_KPRV4: tty_code_code = 176;
pub const TTYC_KPRV3: tty_code_code = 175;
pub const TTYC_KPRV2: tty_code_code = 174;
pub const TTYC_KPP: tty_code_code = 173;
pub const TTYC_KNXT7: tty_code_code = 172;
pub const TTYC_KNXT6: tty_code_code = 171;
pub const TTYC_KNXT5: tty_code_code = 170;
pub const TTYC_KNXT4: tty_code_code = 169;
pub const TTYC_KNXT3: tty_code_code = 168;
pub const TTYC_KNXT2: tty_code_code = 167;
pub const TTYC_KNP: tty_code_code = 166;
pub const TTYC_KMOUS: tty_code_code = 165;
pub const TTYC_KLFT7: tty_code_code = 164;
pub const TTYC_KLFT6: tty_code_code = 163;
pub const TTYC_KLFT5: tty_code_code = 162;
pub const TTYC_KLFT4: tty_code_code = 161;
pub const TTYC_KLFT3: tty_code_code = 160;
pub const TTYC_KLFT2: tty_code_code = 159;
pub const TTYC_KIND: tty_code_code = 158;
pub const TTYC_KICH1: tty_code_code = 157;
pub const TTYC_KIC7: tty_code_code = 156;
pub const TTYC_KIC6: tty_code_code = 155;
pub const TTYC_KIC5: tty_code_code = 154;
pub const TTYC_KIC4: tty_code_code = 153;
pub const TTYC_KIC3: tty_code_code = 152;
pub const TTYC_KIC2: tty_code_code = 151;
pub const TTYC_KHOME: tty_code_code = 150;
pub const TTYC_KHOM7: tty_code_code = 149;
pub const TTYC_KHOM6: tty_code_code = 148;
pub const TTYC_KHOM5: tty_code_code = 147;
pub const TTYC_KHOM4: tty_code_code = 146;
pub const TTYC_KHOM3: tty_code_code = 145;
pub const TTYC_KHOM2: tty_code_code = 144;
pub const TTYC_KF9: tty_code_code = 143;
pub const TTYC_KF8: tty_code_code = 142;
pub const TTYC_KF7: tty_code_code = 141;
pub const TTYC_KF63: tty_code_code = 140;
pub const TTYC_KF62: tty_code_code = 139;
pub const TTYC_KF61: tty_code_code = 138;
pub const TTYC_KF60: tty_code_code = 137;
pub const TTYC_KF6: tty_code_code = 136;
pub const TTYC_KF59: tty_code_code = 135;
pub const TTYC_KF58: tty_code_code = 134;
pub const TTYC_KF57: tty_code_code = 133;
pub const TTYC_KF56: tty_code_code = 132;
pub const TTYC_KF55: tty_code_code = 131;
pub const TTYC_KF54: tty_code_code = 130;
pub const TTYC_KF53: tty_code_code = 129;
pub const TTYC_KF52: tty_code_code = 128;
pub const TTYC_KF51: tty_code_code = 127;
pub const TTYC_KF50: tty_code_code = 126;
pub const TTYC_KF5: tty_code_code = 125;
pub const TTYC_KF49: tty_code_code = 124;
pub const TTYC_KF48: tty_code_code = 123;
pub const TTYC_KF47: tty_code_code = 122;
pub const TTYC_KF46: tty_code_code = 121;
pub const TTYC_KF45: tty_code_code = 120;
pub const TTYC_KF44: tty_code_code = 119;
pub const TTYC_KF43: tty_code_code = 118;
pub const TTYC_KF42: tty_code_code = 117;
pub const TTYC_KF41: tty_code_code = 116;
pub const TTYC_KF40: tty_code_code = 115;
pub const TTYC_KF4: tty_code_code = 114;
pub const TTYC_KF39: tty_code_code = 113;
pub const TTYC_KF38: tty_code_code = 112;
pub const TTYC_KF37: tty_code_code = 111;
pub const TTYC_KF36: tty_code_code = 110;
pub const TTYC_KF35: tty_code_code = 109;
pub const TTYC_KF34: tty_code_code = 108;
pub const TTYC_KF33: tty_code_code = 107;
pub const TTYC_KF32: tty_code_code = 106;
pub const TTYC_KF31: tty_code_code = 105;
pub const TTYC_KF30: tty_code_code = 104;
pub const TTYC_KF3: tty_code_code = 103;
pub const TTYC_KF29: tty_code_code = 102;
pub const TTYC_KF28: tty_code_code = 101;
pub const TTYC_KF27: tty_code_code = 100;
pub const TTYC_KF26: tty_code_code = 99;
pub const TTYC_KF25: tty_code_code = 98;
pub const TTYC_KF24: tty_code_code = 97;
pub const TTYC_KF23: tty_code_code = 96;
pub const TTYC_KF22: tty_code_code = 95;
pub const TTYC_KF21: tty_code_code = 94;
pub const TTYC_KF20: tty_code_code = 93;
pub const TTYC_KF2: tty_code_code = 92;
pub const TTYC_KF19: tty_code_code = 91;
pub const TTYC_KF18: tty_code_code = 90;
pub const TTYC_KF17: tty_code_code = 89;
pub const TTYC_KF16: tty_code_code = 88;
pub const TTYC_KF15: tty_code_code = 87;
pub const TTYC_KF14: tty_code_code = 86;
pub const TTYC_KF13: tty_code_code = 85;
pub const TTYC_KF12: tty_code_code = 84;
pub const TTYC_KF11: tty_code_code = 83;
pub const TTYC_KF10: tty_code_code = 82;
pub const TTYC_KF1: tty_code_code = 81;
pub const TTYC_KEND7: tty_code_code = 80;
pub const TTYC_KEND6: tty_code_code = 79;
pub const TTYC_KEND5: tty_code_code = 78;
pub const TTYC_KEND4: tty_code_code = 77;
pub const TTYC_KEND3: tty_code_code = 76;
pub const TTYC_KEND2: tty_code_code = 75;
pub const TTYC_KEND: tty_code_code = 74;
pub const TTYC_KDN7: tty_code_code = 73;
pub const TTYC_KDN6: tty_code_code = 72;
pub const TTYC_KDN5: tty_code_code = 71;
pub const TTYC_KDN4: tty_code_code = 70;
pub const TTYC_KDN3: tty_code_code = 69;
pub const TTYC_KDN2: tty_code_code = 68;
pub const TTYC_KDCH1: tty_code_code = 67;
pub const TTYC_KDC7: tty_code_code = 66;
pub const TTYC_KDC6: tty_code_code = 65;
pub const TTYC_KDC5: tty_code_code = 64;
pub const TTYC_KDC4: tty_code_code = 63;
pub const TTYC_KDC3: tty_code_code = 62;
pub const TTYC_KDC2: tty_code_code = 61;
pub const TTYC_KCUU1: tty_code_code = 60;
pub const TTYC_KCUF1: tty_code_code = 59;
pub const TTYC_KCUD1: tty_code_code = 58;
pub const TTYC_KCUB1: tty_code_code = 57;
pub const TTYC_KCBT: tty_code_code = 56;
pub const TTYC_INVIS: tty_code_code = 55;
pub const TTYC_INDN: tty_code_code = 54;
pub const TTYC_IL1: tty_code_code = 53;
pub const TTYC_IL: tty_code_code = 52;
pub const TTYC_ICH1: tty_code_code = 51;
pub const TTYC_ICH: tty_code_code = 50;
pub const TTYC_HPA: tty_code_code = 49;
pub const TTYC_HOME: tty_code_code = 48;
pub const TTYC_HLS: tty_code_code = 47;
pub const TTYC_FSL: tty_code_code = 46;
pub const TTYC_ENMG: tty_code_code = 45;
pub const TTYC_ENFCS: tty_code_code = 44;
pub const TTYC_ENEKS: tty_code_code = 43;
pub const TTYC_ENBP: tty_code_code = 42;
pub const TTYC_ENACS: tty_code_code = 41;
pub const TTYC_EL1: tty_code_code = 40;
pub const TTYC_EL: tty_code_code = 39;
pub const TTYC_ED: tty_code_code = 38;
pub const TTYC_ECH: tty_code_code = 37;
pub const TTYC_E3: tty_code_code = 36;
pub const TTYC_DSMG: tty_code_code = 35;
pub const TTYC_DSFCS: tty_code_code = 34;
pub const TTYC_DSEKS: tty_code_code = 33;
pub const TTYC_DSBP: tty_code_code = 32;
pub const TTYC_DL1: tty_code_code = 31;
pub const TTYC_DL: tty_code_code = 30;
pub const TTYC_DIM: tty_code_code = 29;
pub const TTYC_DCH1: tty_code_code = 28;
pub const TTYC_DCH: tty_code_code = 27;
pub const TTYC_CVVIS: tty_code_code = 26;
pub const TTYC_CUU1: tty_code_code = 25;
pub const TTYC_CUU: tty_code_code = 24;
pub const TTYC_CUP: tty_code_code = 23;
pub const TTYC_CUF1: tty_code_code = 22;
pub const TTYC_CUF: tty_code_code = 21;
pub const TTYC_CUD1: tty_code_code = 20;
pub const TTYC_CUD: tty_code_code = 19;
pub const TTYC_CUB1: tty_code_code = 18;
pub const TTYC_CUB: tty_code_code = 17;
pub const TTYC_CSR: tty_code_code = 16;
pub const TTYC_CS: tty_code_code = 15;
pub const TTYC_CR: tty_code_code = 14;
pub const TTYC_COLORS: tty_code_code = 13;
pub const TTYC_CNORM: tty_code_code = 12;
pub const TTYC_CMG: tty_code_code = 11;
pub const TTYC_CLMG: tty_code_code = 10;
pub const TTYC_CLEAR: tty_code_code = 9;
pub const TTYC_CIVIS: tty_code_code = 8;
pub const TTYC_BOLD: tty_code_code = 7;
pub const TTYC_BLINK: tty_code_code = 6;
pub const TTYC_BIDI: tty_code_code = 5;
pub const TTYC_BEL: tty_code_code = 4;
pub const TTYC_BCE: tty_code_code = 3;
pub const TTYC_AX: tty_code_code = 2;
pub const TTYC_AM: tty_code_code = 1;
pub const TTYC_ACSC: tty_code_code = 0;
pub type utf8_state = u32;
pub const UTF8_ERROR: utf8_state = 2;
pub const UTF8_DONE: utf8_state = 1;
pub const UTF8_MORE: utf8_state = 0;
#[derive(Copy, Clone)]
#[repr(C)]
pub struct options_array {
    pub rbh_root: *mut options_array_item,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub union options_value {
    pub string: *mut i8,
    pub number: i64,
    pub style: style,
    pub array: options_array,
    pub cmdlist: *mut cmd_list,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct tty_default_key_code {
    pub code: tty_code_code,
    pub key: key_code,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct tty_default_key_raw {
    pub string: *const i8,
    pub key: key_code,
}
#[derive(Copy, Clone)]
#[repr(C)]
pub struct tty_default_key_xterm {
    pub template: *const i8,
    pub key: key_code,
}
static mut tty_default_raw_keys: [tty_default_key_raw; 100] = [
    {
        let mut init = tty_default_key_raw {
            string: b"\x1BO[\0" as *const u8 as *const i8,
            key: '\u{1b}' as i32 as key_code,
        };
        init
    },
    {
        let mut init = tty_default_key_raw {
            string: b"\x1BOo\0" as *const u8 as *const i8,
            key: KEYC_KP_SLASH as i32 as u64 | KEYC_VI00000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_raw {
            string: b"\x1BOj\0" as *const u8 as *const i8,
            key: KEYC_KP_STAR as i32 as u64 | KEYC_VI00000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_raw {
            string: b"\x1BOm\0" as *const u8 as *const i8,
            key: KEYC_KP_MINUS as i32 as u64 | KEYC_VI00000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_raw {
            string: b"\x1BOw\0" as *const u8 as *const i8,
            key: KEYC_KP_SEVEN as i32 as u64 | KEYC_VI00000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_raw {
            string: b"\x1BOx\0" as *const u8 as *const i8,
            key: KEYC_KP_EIGHT as i32 as u64 | KEYC_VI00000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_raw {
            string: b"\x1BOy\0" as *const u8 as *const i8,
            key: KEYC_KP_NINE as i32 as u64 | KEYC_VI00000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_raw {
            string: b"\x1BOk\0" as *const u8 as *const i8,
            key: KEYC_KP_PLUS as i32 as u64 | KEYC_VI00000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_raw {
            string: b"\x1BOt\0" as *const u8 as *const i8,
            key: KEYC_KP_FOUR as i32 as u64 | KEYC_VI00000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_raw {
            string: b"\x1BOu\0" as *const u8 as *const i8,
            key: KEYC_KP_FIVE as i32 as u64 | KEYC_VI00000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_raw {
            string: b"\x1BOv\0" as *const u8 as *const i8,
            key: KEYC_KP_SIX as i32 as u64 | KEYC_VI00000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_raw {
            string: b"\x1BOq\0" as *const u8 as *const i8,
            key: KEYC_KP_ONE as i32 as u64 | KEYC_VI00000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_raw {
            string: b"\x1BOr\0" as *const u8 as *const i8,
            key: KEYC_KP_TWO as i32 as u64 | KEYC_VI00000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_raw {
            string: b"\x1BOs\0" as *const u8 as *const i8,
            key: KEYC_KP_THREE as i32 as u64 | KEYC_VI00000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_raw {
            string: b"\x1BOM\0" as *const u8 as *const i8,
            key: KEYC_KP_ENTER as i32 as u64 | KEYC_VI00000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_raw {
            string: b"\x1BOp\0" as *const u8 as *const i8,
            key: KEYC_KP_ZERO as i32 as u64 | KEYC_VI00000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_raw {
            string: b"\x1BOn\0" as *const u8 as *const i8,
            key: KEYC_KP_PERIOD as i32 as u64 | KEYC_VI00000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_raw {
            string: b"\x1BOA\0" as *const u8 as *const i8,
            key: KEYC_UP as i32 as u64 | KEYC_SENT00000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_raw {
            string: b"\x1BOB\0" as *const u8 as *const i8,
            key: KEYC_DOWN as i32 as u64 | KEYC_SENT00000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_raw {
            string: b"\x1BOC\0" as *const u8 as *const i8,
            key: KEYC_RIGHT as i32 as u64 | KEYC_SENT00000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_raw {
            string: b"\x1BOD\0" as *const u8 as *const i8,
            key: KEYC_LEFT as i32 as u64 | KEYC_SENT00000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_raw {
            string: b"\x1B[A\0" as *const u8 as *const i8,
            key: KEYC_UP as i32 as u64 | KEYC_SENT00000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_raw {
            string: b"\x1B[B\0" as *const u8 as *const i8,
            key: KEYC_DOWN as i32 as u64 | KEYC_SENT00000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_raw {
            string: b"\x1B[C\0" as *const u8 as *const i8,
            key: KEYC_RIGHT as i32 as u64 | KEYC_SENT00000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_raw {
            string: b"\x1B[D\0" as *const u8 as *const i8,
            key: KEYC_LEFT as i32 as u64 | KEYC_SENT00000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_raw {
            string: b"\x1B\x1BOA\0" as *const u8 as *const i8,
            key: KEYC_UP as i32 as u64 | KEYC_SENT00000 as u64 | KEYC_BUILD_MODIFIERS0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_raw {
            string: b"\x1B\x1BOB\0" as *const u8 as *const i8,
            key: KEYC_DOWN as i32 as u64 | KEYC_SENT00000 as u64 | KEYC_BUILD_MODIFIERS0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_raw {
            string: b"\x1B\x1BOC\0" as *const u8 as *const i8,
            key: KEYC_RIGHT as i32 as u64 | KEYC_SENT00000 as u64 | KEYC_BUILD_MODIFIERS0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_raw {
            string: b"\x1B\x1BOD\0" as *const u8 as *const i8,
            key: KEYC_LEFT as i32 as u64 | KEYC_SENT00000 as u64 | KEYC_BUILD_MODIFIERS0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_raw {
            string: b"\x1B\x1B[A\0" as *const u8 as *const i8,
            key: KEYC_UP as i32 as u64 | KEYC_SENT00000 as u64 | KEYC_BUILD_MODIFIERS0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_raw {
            string: b"\x1B\x1B[B\0" as *const u8 as *const i8,
            key: KEYC_DOWN as i32 as u64 | KEYC_SENT00000 as u64 | KEYC_BUILD_MODIFIERS0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_raw {
            string: b"\x1B\x1B[C\0" as *const u8 as *const i8,
            key: KEYC_RIGHT as i32 as u64 | KEYC_SENT00000 as u64 | KEYC_BUILD_MODIFIERS0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_raw {
            string: b"\x1B\x1B[D\0" as *const u8 as *const i8,
            key: KEYC_LEFT as i32 as u64 | KEYC_SENT00000 as u64 | KEYC_BUILD_MODIFIERS0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_raw {
            string: b"\x1BOH\0" as *const u8 as *const i8,
            key: KEYC_HOME as i32 as key_code,
        };
        init
    },
    {
        let mut init = tty_default_key_raw {
            string: b"\x1BOF\0" as *const u8 as *const i8,
            key: KEYC_END as i32 as key_code,
        };
        init
    },
    {
        let mut init = tty_default_key_raw {
            string: b"\x1B\x1BOH\0" as *const u8 as *const i8,
            key: KEYC_HOME as i32 as u64 | KEYC_BUILD_MODIFIERS0000 as u64 | CLIENT_ACTIVEPANE00000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_raw {
            string: b"\x1B\x1BOF\0" as *const u8 as *const i8,
            key: KEYC_END as i32 as u64 | KEYC_BUILD_MODIFIERS0000 as u64 | CLIENT_ACTIVEPANE00000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_raw {
            string: b"\x1B[H\0" as *const u8 as *const i8,
            key: KEYC_HOME as i32 as key_code,
        };
        init
    },
    {
        let mut init = tty_default_key_raw {
            string: b"\x1B[F\0" as *const u8 as *const i8,
            key: KEYC_END as i32 as key_code,
        };
        init
    },
    {
        let mut init = tty_default_key_raw {
            string: b"\x1B\x1B[H\0" as *const u8 as *const i8,
            key: KEYC_HOME as i32 as u64 | KEYC_BUILD_MODIFIERS0000 as u64 | CLIENT_ACTIVEPANE00000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_raw {
            string: b"\x1B\x1B[F\0" as *const u8 as *const i8,
            key: KEYC_END as i32 as u64 | KEYC_BUILD_MODIFIERS0000 as u64 | CLIENT_ACTIVEPANE00000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_raw {
            string: b"\x1BOa\0" as *const u8 as *const i8,
            key: KEYC_UP as i32 as u64 | KEYC_VI0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_raw {
            string: b"\x1BOb\0" as *const u8 as *const i8,
            key: KEYC_DOWN as i32 as u64 | KEYC_VI0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_raw {
            string: b"\x1BOc\0" as *const u8 as *const i8,
            key: KEYC_RIGHT as i32 as u64 | KEYC_VI0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_raw {
            string: b"\x1BOd\0" as *const u8 as *const i8,
            key: KEYC_LEFT as i32 as u64 | KEYC_VI0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_raw {
            string: b"\x1B[a\0" as *const u8 as *const i8,
            key: KEYC_UP as i32 as u64 | KEYC_SENT0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_raw {
            string: b"\x1B[b\0" as *const u8 as *const i8,
            key: KEYC_DOWN as i32 as u64 | KEYC_SENT0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_raw {
            string: b"\x1B[c\0" as *const u8 as *const i8,
            key: KEYC_RIGHT as i32 as u64 | KEYC_SENT0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_raw {
            string: b"\x1B[d\0" as *const u8 as *const i8,
            key: KEYC_LEFT as i32 as u64 | KEYC_SENT0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_raw {
            string: b"\x1B[11~\0" as *const u8 as *const i8,
            key: KEYC_F1 as i32 as key_code,
        };
        init
    },
    {
        let mut init = tty_default_key_raw {
            string: b"\x1B[12~\0" as *const u8 as *const i8,
            key: KEYC_F2 as i32 as key_code,
        };
        init
    },
    {
        let mut init = tty_default_key_raw {
            string: b"\x1B[13~\0" as *const u8 as *const i8,
            key: KEYC_F3 as i32 as key_code,
        };
        init
    },
    {
        let mut init = tty_default_key_raw {
            string: b"\x1B[14~\0" as *const u8 as *const i8,
            key: KEYC_F4 as i32 as key_code,
        };
        init
    },
    {
        let mut init = tty_default_key_raw {
            string: b"\x1B[15~\0" as *const u8 as *const i8,
            key: KEYC_F5 as i32 as key_code,
        };
        init
    },
    {
        let mut init = tty_default_key_raw {
            string: b"\x1B[17~\0" as *const u8 as *const i8,
            key: KEYC_F6 as i32 as key_code,
        };
        init
    },
    {
        let mut init = tty_default_key_raw {
            string: b"\x1B[18~\0" as *const u8 as *const i8,
            key: KEYC_F7 as i32 as key_code,
        };
        init
    },
    {
        let mut init = tty_default_key_raw {
            string: b"\x1B[19~\0" as *const u8 as *const i8,
            key: KEYC_F8 as i32 as key_code,
        };
        init
    },
    {
        let mut init = tty_default_key_raw {
            string: b"\x1B[20~\0" as *const u8 as *const i8,
            key: KEYC_F9 as i32 as key_code,
        };
        init
    },
    {
        let mut init = tty_default_key_raw {
            string: b"\x1B[21~\0" as *const u8 as *const i8,
            key: KEYC_F10 as i32 as key_code,
        };
        init
    },
    {
        let mut init = tty_default_key_raw {
            string: b"\x1B[23~\0" as *const u8 as *const i8,
            key: KEYC_F1 as i32 as u64 | KEYC_SENT0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_raw {
            string: b"\x1B[24~\0" as *const u8 as *const i8,
            key: KEYC_F2 as i32 as u64 | KEYC_SENT0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_raw {
            string: b"\x1B[25~\0" as *const u8 as *const i8,
            key: KEYC_F3 as i32 as u64 | KEYC_SENT0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_raw {
            string: b"\x1B[26~\0" as *const u8 as *const i8,
            key: KEYC_F4 as i32 as u64 | KEYC_SENT0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_raw {
            string: b"\x1B[28~\0" as *const u8 as *const i8,
            key: KEYC_F5 as i32 as u64 | KEYC_SENT0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_raw {
            string: b"\x1B[29~\0" as *const u8 as *const i8,
            key: KEYC_F6 as i32 as u64 | KEYC_SENT0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_raw {
            string: b"\x1B[31~\0" as *const u8 as *const i8,
            key: KEYC_F7 as i32 as u64 | KEYC_SENT0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_raw {
            string: b"\x1B[32~\0" as *const u8 as *const i8,
            key: KEYC_F8 as i32 as u64 | KEYC_SENT0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_raw {
            string: b"\x1B[33~\0" as *const u8 as *const i8,
            key: KEYC_F9 as i32 as u64 | KEYC_SENT0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_raw {
            string: b"\x1B[34~\0" as *const u8 as *const i8,
            key: KEYC_F10 as i32 as u64 | KEYC_SENT0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_raw {
            string: b"\x1B[23$\0" as *const u8 as *const i8,
            key: KEYC_F11 as i32 as u64 | KEYC_SENT0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_raw {
            string: b"\x1B[24$\0" as *const u8 as *const i8,
            key: KEYC_F12 as i32 as u64 | KEYC_SENT0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_raw {
            string: b"\x1B[11^\0" as *const u8 as *const i8,
            key: KEYC_F1 as i32 as u64 | KEYC_VI0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_raw {
            string: b"\x1B[12^\0" as *const u8 as *const i8,
            key: KEYC_F2 as i32 as u64 | KEYC_VI0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_raw {
            string: b"\x1B[13^\0" as *const u8 as *const i8,
            key: KEYC_F3 as i32 as u64 | KEYC_VI0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_raw {
            string: b"\x1B[14^\0" as *const u8 as *const i8,
            key: KEYC_F4 as i32 as u64 | KEYC_VI0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_raw {
            string: b"\x1B[15^\0" as *const u8 as *const i8,
            key: KEYC_F5 as i32 as u64 | KEYC_VI0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_raw {
            string: b"\x1B[17^\0" as *const u8 as *const i8,
            key: KEYC_F6 as i32 as u64 | KEYC_VI0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_raw {
            string: b"\x1B[18^\0" as *const u8 as *const i8,
            key: KEYC_F7 as i32 as u64 | KEYC_VI0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_raw {
            string: b"\x1B[19^\0" as *const u8 as *const i8,
            key: KEYC_F8 as i32 as u64 | KEYC_VI0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_raw {
            string: b"\x1B[20^\0" as *const u8 as *const i8,
            key: KEYC_F9 as i32 as u64 | KEYC_VI0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_raw {
            string: b"\x1B[21^\0" as *const u8 as *const i8,
            key: KEYC_F10 as i32 as u64 | KEYC_VI0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_raw {
            string: b"\x1B[23^\0" as *const u8 as *const i8,
            key: KEYC_F11 as i32 as u64 | KEYC_VI0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_raw {
            string: b"\x1B[24^\0" as *const u8 as *const i8,
            key: KEYC_F12 as i32 as u64 | KEYC_VI0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_raw {
            string: b"\x1B[11@\0" as *const u8 as *const i8,
            key: KEYC_F1 as i32 as u64 | KEYC_VI0000 as u64 | KEYC_SENT0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_raw {
            string: b"\x1B[12@\0" as *const u8 as *const i8,
            key: KEYC_F2 as i32 as u64 | KEYC_VI0000 as u64 | KEYC_SENT0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_raw {
            string: b"\x1B[13@\0" as *const u8 as *const i8,
            key: KEYC_F3 as i32 as u64 | KEYC_VI0000 as u64 | KEYC_SENT0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_raw {
            string: b"\x1B[14@\0" as *const u8 as *const i8,
            key: KEYC_F4 as i32 as u64 | KEYC_VI0000 as u64 | KEYC_SENT0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_raw {
            string: b"\x1B[15@\0" as *const u8 as *const i8,
            key: KEYC_F5 as i32 as u64 | KEYC_VI0000 as u64 | KEYC_SENT0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_raw {
            string: b"\x1B[17@\0" as *const u8 as *const i8,
            key: KEYC_F6 as i32 as u64 | KEYC_VI0000 as u64 | KEYC_SENT0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_raw {
            string: b"\x1B[18@\0" as *const u8 as *const i8,
            key: KEYC_F7 as i32 as u64 | KEYC_VI0000 as u64 | KEYC_SENT0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_raw {
            string: b"\x1B[19@\0" as *const u8 as *const i8,
            key: KEYC_F8 as i32 as u64 | KEYC_VI0000 as u64 | KEYC_SENT0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_raw {
            string: b"\x1B[20@\0" as *const u8 as *const i8,
            key: KEYC_F9 as i32 as u64 | KEYC_VI0000 as u64 | KEYC_SENT0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_raw {
            string: b"\x1B[21@\0" as *const u8 as *const i8,
            key: KEYC_F10 as i32 as u64 | KEYC_VI0000 as u64 | KEYC_SENT0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_raw {
            string: b"\x1B[23@\0" as *const u8 as *const i8,
            key: KEYC_F11 as i32 as u64 | KEYC_VI0000 as u64 | KEYC_SENT0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_raw {
            string: b"\x1B[24@\0" as *const u8 as *const i8,
            key: KEYC_F12 as i32 as u64 | KEYC_VI0000 as u64 | KEYC_SENT0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_raw {
            string: b"\x1B[I\0" as *const u8 as *const i8,
            key: KEYC_FOCUS_IN as i32 as key_code,
        };
        init
    },
    {
        let mut init = tty_default_key_raw {
            string: b"\x1B[O\0" as *const u8 as *const i8,
            key: KEYC_FOCUS_OUT as i32 as key_code,
        };
        init
    },
    {
        let mut init = tty_default_key_raw {
            string: b"\x1B[200~\0" as *const u8 as *const i8,
            key: KEYC_PASTE_START as i32 as key_code,
        };
        init
    },
    {
        let mut init = tty_default_key_raw {
            string: b"\x1B[201~\0" as *const u8 as *const i8,
            key: KEYC_PASTE_END as i32 as key_code,
        };
        init
    },
    {
        let mut init = tty_default_key_raw {
            string: b"\x1B[1;5Z\0" as *const u8 as *const i8,
            key: '\t' as i32 as u64 | KEYC_VI0000 as u64 | KEYC_SENT0000 as u64,
        };
        init
    },
];
static mut tty_default_xterm_keys: [tty_default_key_xterm; 30] = [
    {
        let mut init = tty_default_key_xterm {
            template: b"\x1B[1;_P\0" as *const u8 as *const i8,
            key: KEYC_F1 as i32 as key_code,
        };
        init
    },
    {
        let mut init = tty_default_key_xterm {
            template: b"\x1BO1;_P\0" as *const u8 as *const i8,
            key: KEYC_F1 as i32 as key_code,
        };
        init
    },
    {
        let mut init = tty_default_key_xterm {
            template: b"\x1BO_P\0" as *const u8 as *const i8,
            key: KEYC_F1 as i32 as key_code,
        };
        init
    },
    {
        let mut init = tty_default_key_xterm {
            template: b"\x1B[1;_Q\0" as *const u8 as *const i8,
            key: KEYC_F2 as i32 as key_code,
        };
        init
    },
    {
        let mut init = tty_default_key_xterm {
            template: b"\x1BO1;_Q\0" as *const u8 as *const i8,
            key: KEYC_F2 as i32 as key_code,
        };
        init
    },
    {
        let mut init = tty_default_key_xterm {
            template: b"\x1BO_Q\0" as *const u8 as *const i8,
            key: KEYC_F2 as i32 as key_code,
        };
        init
    },
    {
        let mut init = tty_default_key_xterm {
            template: b"\x1B[1;_R\0" as *const u8 as *const i8,
            key: KEYC_F3 as i32 as key_code,
        };
        init
    },
    {
        let mut init = tty_default_key_xterm {
            template: b"\x1BO1;_R\0" as *const u8 as *const i8,
            key: KEYC_F3 as i32 as key_code,
        };
        init
    },
    {
        let mut init = tty_default_key_xterm {
            template: b"\x1BO_R\0" as *const u8 as *const i8,
            key: KEYC_F3 as i32 as key_code,
        };
        init
    },
    {
        let mut init = tty_default_key_xterm {
            template: b"\x1B[1;_S\0" as *const u8 as *const i8,
            key: KEYC_F4 as i32 as key_code,
        };
        init
    },
    {
        let mut init = tty_default_key_xterm {
            template: b"\x1BO1;_S\0" as *const u8 as *const i8,
            key: KEYC_F4 as i32 as key_code,
        };
        init
    },
    {
        let mut init = tty_default_key_xterm {
            template: b"\x1BO_S\0" as *const u8 as *const i8,
            key: KEYC_F4 as i32 as key_code,
        };
        init
    },
    {
        let mut init = tty_default_key_xterm {
            template: b"\x1B[15;_~\0" as *const u8 as *const i8,
            key: KEYC_F5 as i32 as key_code,
        };
        init
    },
    {
        let mut init = tty_default_key_xterm {
            template: b"\x1B[17;_~\0" as *const u8 as *const i8,
            key: KEYC_F6 as i32 as key_code,
        };
        init
    },
    {
        let mut init = tty_default_key_xterm {
            template: b"\x1B[18;_~\0" as *const u8 as *const i8,
            key: KEYC_F7 as i32 as key_code,
        };
        init
    },
    {
        let mut init = tty_default_key_xterm {
            template: b"\x1B[19;_~\0" as *const u8 as *const i8,
            key: KEYC_F8 as i32 as key_code,
        };
        init
    },
    {
        let mut init = tty_default_key_xterm {
            template: b"\x1B[20;_~\0" as *const u8 as *const i8,
            key: KEYC_F9 as i32 as key_code,
        };
        init
    },
    {
        let mut init = tty_default_key_xterm {
            template: b"\x1B[21;_~\0" as *const u8 as *const i8,
            key: KEYC_F10 as i32 as key_code,
        };
        init
    },
    {
        let mut init = tty_default_key_xterm {
            template: b"\x1B[23;_~\0" as *const u8 as *const i8,
            key: KEYC_F11 as i32 as key_code,
        };
        init
    },
    {
        let mut init = tty_default_key_xterm {
            template: b"\x1B[24;_~\0" as *const u8 as *const i8,
            key: KEYC_F12 as i32 as key_code,
        };
        init
    },
    {
        let mut init = tty_default_key_xterm {
            template: b"\x1B[1;_A\0" as *const u8 as *const i8,
            key: KEYC_UP as i32 as key_code,
        };
        init
    },
    {
        let mut init = tty_default_key_xterm {
            template: b"\x1B[1;_B\0" as *const u8 as *const i8,
            key: KEYC_DOWN as i32 as key_code,
        };
        init
    },
    {
        let mut init = tty_default_key_xterm {
            template: b"\x1B[1;_C\0" as *const u8 as *const i8,
            key: KEYC_RIGHT as i32 as key_code,
        };
        init
    },
    {
        let mut init = tty_default_key_xterm {
            template: b"\x1B[1;_D\0" as *const u8 as *const i8,
            key: KEYC_LEFT as i32 as key_code,
        };
        init
    },
    {
        let mut init = tty_default_key_xterm {
            template: b"\x1B[1;_H\0" as *const u8 as *const i8,
            key: KEYC_HOME as i32 as key_code,
        };
        init
    },
    {
        let mut init = tty_default_key_xterm {
            template: b"\x1B[1;_F\0" as *const u8 as *const i8,
            key: KEYC_END as i32 as key_code,
        };
        init
    },
    {
        let mut init = tty_default_key_xterm {
            template: b"\x1B[5;_~\0" as *const u8 as *const i8,
            key: KEYC_PPAGE as i32 as key_code,
        };
        init
    },
    {
        let mut init = tty_default_key_xterm {
            template: b"\x1B[6;_~\0" as *const u8 as *const i8,
            key: KEYC_NPAGE as i32 as key_code,
        };
        init
    },
    {
        let mut init = tty_default_key_xterm {
            template: b"\x1B[2;_~\0" as *const u8 as *const i8,
            key: KEYC_IC as i32 as key_code,
        };
        init
    },
    {
        let mut init = tty_default_key_xterm {
            template: b"\x1B[3;_~\0" as *const u8 as *const i8,
            key: KEYC_DC as i32 as key_code,
        };
        init
    },
];
static mut tty_default_xterm_modifiers: [key_code; 10] = [ 0 as key_code, 0 as key_code,
    KEYC_SENT0000 as u64,
    KEYC_BUILD_MODIFIERS0000 as u64 | CLIENT_ACTIVEPANE00000 as u64,
    KEYC_SENT0000 as u64 | KEYC_BUILD_MODIFIERS0000 as u64 | CLIENT_ACTIVEPANE00000 as u64,
    KEYC_VI0000 as u64,
    KEYC_SENT0000 as u64 | KEYC_VI0000 as u64,
    KEYC_BUILD_MODIFIERS0000 as u64 | CLIENT_ACTIVEPANE00000 as u64 | KEYC_VI0000 as u64,
    KEYC_SENT0000 as u64 | KEYC_BUILD_MODIFIERS0000 as u64 | CLIENT_ACTIVEPANE00000 as u64 | KEYC_VI0000 as u64,
    KEYC_BUILD_MODIFIERS0000 as u64 | CLIENT_ACTIVEPANE00000 as u64,
];
static mut tty_default_code_keys: [tty_default_key_code; 136] = [
    {
        let mut init = tty_default_key_code {
            code: TTYC_KF1,
            key: KEYC_F1 as i32 as key_code,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KF2,
            key: KEYC_F2 as i32 as key_code,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KF3,
            key: KEYC_F3 as i32 as key_code,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KF4,
            key: KEYC_F4 as i32 as key_code,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KF5,
            key: KEYC_F5 as i32 as key_code,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KF6,
            key: KEYC_F6 as i32 as key_code,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KF7,
            key: KEYC_F7 as i32 as key_code,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KF8,
            key: KEYC_F8 as i32 as key_code,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KF9,
            key: KEYC_F9 as i32 as key_code,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KF10,
            key: KEYC_F10 as i32 as key_code,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KF11,
            key: KEYC_F11 as i32 as key_code,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KF12,
            key: KEYC_F12 as i32 as key_code,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KF13,
            key: KEYC_F1 as i32 as u64 | KEYC_SENT0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KF14,
            key: KEYC_F2 as i32 as u64 | KEYC_SENT0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KF15,
            key: KEYC_F3 as i32 as u64 | KEYC_SENT0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KF16,
            key: KEYC_F4 as i32 as u64 | KEYC_SENT0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KF17,
            key: KEYC_F5 as i32 as u64 | KEYC_SENT0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KF18,
            key: KEYC_F6 as i32 as u64 | KEYC_SENT0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KF19,
            key: KEYC_F7 as i32 as u64 | KEYC_SENT0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KF20,
            key: KEYC_F8 as i32 as u64 | KEYC_SENT0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KF21,
            key: KEYC_F9 as i32 as u64 | KEYC_SENT0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KF22,
            key: KEYC_F10 as i32 as u64 | KEYC_SENT0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KF23,
            key: KEYC_F11 as i32 as u64 | KEYC_SENT0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KF24,
            key: KEYC_F12 as i32 as u64 | KEYC_SENT0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KF25,
            key: KEYC_F1 as i32 as u64 | KEYC_VI0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KF26,
            key: KEYC_F2 as i32 as u64 | KEYC_VI0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KF27,
            key: KEYC_F3 as i32 as u64 | KEYC_VI0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KF28,
            key: KEYC_F4 as i32 as u64 | KEYC_VI0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KF29,
            key: KEYC_F5 as i32 as u64 | KEYC_VI0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KF30,
            key: KEYC_F6 as i32 as u64 | KEYC_VI0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KF31,
            key: KEYC_F7 as i32 as u64 | KEYC_VI0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KF32,
            key: KEYC_F8 as i32 as u64 | KEYC_VI0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KF33,
            key: KEYC_F9 as i32 as u64 | KEYC_VI0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KF34,
            key: KEYC_F10 as i32 as u64 | KEYC_VI0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KF35,
            key: KEYC_F11 as i32 as u64 | KEYC_VI0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KF36,
            key: KEYC_F12 as i32 as u64 | KEYC_VI0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KF37,
            key: KEYC_F1 as i32 as u64 | KEYC_SENT0000 as u64 | KEYC_VI0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KF38,
            key: KEYC_F2 as i32 as u64 | KEYC_SENT0000 as u64 | KEYC_VI0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KF39,
            key: KEYC_F3 as i32 as u64 | KEYC_SENT0000 as u64 | KEYC_VI0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KF40,
            key: KEYC_F4 as i32 as u64 | KEYC_SENT0000 as u64 | KEYC_VI0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KF41,
            key: KEYC_F5 as i32 as u64 | KEYC_SENT0000 as u64 | KEYC_VI0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KF42,
            key: KEYC_F6 as i32 as u64 | KEYC_SENT0000 as u64 | KEYC_VI0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KF43,
            key: KEYC_F7 as i32 as u64 | KEYC_SENT0000 as u64 | KEYC_VI0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KF44,
            key: KEYC_F8 as i32 as u64 | KEYC_SENT0000 as u64 | KEYC_VI0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KF45,
            key: KEYC_F9 as i32 as u64 | KEYC_SENT0000 as u64 | KEYC_VI0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KF46,
            key: KEYC_F10 as i32 as u64 | KEYC_SENT0000 as u64 | KEYC_VI0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KF47,
            key: KEYC_F11 as i32 as u64 | KEYC_SENT0000 as u64 | KEYC_VI0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KF48,
            key: KEYC_F12 as i32 as u64 | KEYC_SENT0000 as u64 | KEYC_VI0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KF49,
            key: KEYC_F1 as i32 as u64 | KEYC_BUILD_MODIFIERS0000 as u64 | CLIENT_ACTIVEPANE00000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KF50,
            key: KEYC_F2 as i32 as u64 | KEYC_BUILD_MODIFIERS0000 as u64 | CLIENT_ACTIVEPANE00000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KF51,
            key: KEYC_F3 as i32 as u64 | KEYC_BUILD_MODIFIERS0000 as u64 | CLIENT_ACTIVEPANE00000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KF52,
            key: KEYC_F4 as i32 as u64 | KEYC_BUILD_MODIFIERS0000 as u64 | CLIENT_ACTIVEPANE00000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KF53,
            key: KEYC_F5 as i32 as u64 | KEYC_BUILD_MODIFIERS0000 as u64 | CLIENT_ACTIVEPANE00000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KF54,
            key: KEYC_F6 as i32 as u64 | KEYC_BUILD_MODIFIERS0000 as u64 | CLIENT_ACTIVEPANE00000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KF55,
            key: KEYC_F7 as i32 as u64 | KEYC_BUILD_MODIFIERS0000 as u64 | CLIENT_ACTIVEPANE00000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KF56,
            key: KEYC_F8 as i32 as u64 | KEYC_BUILD_MODIFIERS0000 as u64 | CLIENT_ACTIVEPANE00000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KF57,
            key: KEYC_F9 as i32 as u64 | KEYC_BUILD_MODIFIERS0000 as u64 | CLIENT_ACTIVEPANE00000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KF58,
            key: KEYC_F10 as i32 as u64 | KEYC_BUILD_MODIFIERS0000 as u64 | CLIENT_ACTIVEPANE00000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KF59,
            key: KEYC_F11 as i32 as u64 | KEYC_BUILD_MODIFIERS0000 as u64 | CLIENT_ACTIVEPANE00000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KF60,
            key: KEYC_F12 as i32 as u64 | KEYC_BUILD_MODIFIERS0000 as u64 | CLIENT_ACTIVEPANE00000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KF61,
            key: KEYC_F1 as i32 as u64
                | KEYC_BUILD_MODIFIERS0000 as u64
                | CLIENT_ACTIVEPANE00000 as u64
                | KEYC_SENT0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KF62,
            key: KEYC_F2 as i32 as u64
                | KEYC_BUILD_MODIFIERS0000 as u64
                | CLIENT_ACTIVEPANE00000 as u64
                | KEYC_SENT0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KF63,
            key: KEYC_F3 as i32 as u64
                | KEYC_BUILD_MODIFIERS0000 as u64
                | CLIENT_ACTIVEPANE00000 as u64
                | KEYC_SENT0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KICH1,
            key: KEYC_IC as i32 as key_code,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KDCH1,
            key: KEYC_DC as i32 as key_code,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KHOME,
            key: KEYC_HOME as i32 as key_code,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KEND,
            key: KEYC_END as i32 as key_code,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KNP,
            key: KEYC_NPAGE as i32 as key_code,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KPP,
            key: KEYC_PPAGE as i32 as key_code,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KCBT,
            key: KEYC_BTAB as i32 as key_code,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KCUU1,
            key: KEYC_UP as i32 as u64 | KEYC_SENT00000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KCUD1,
            key: KEYC_DOWN as i32 as u64 | KEYC_SENT00000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KCUB1,
            key: KEYC_LEFT as i32 as u64 | KEYC_SENT00000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KCUF1,
            key: KEYC_RIGHT as i32 as u64 | KEYC_SENT00000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KDC2,
            key: KEYC_DC as i32 as u64 | KEYC_SENT0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KDC3,
            key: KEYC_DC as i32 as u64 | KEYC_BUILD_MODIFIERS0000 as u64 | CLIENT_ACTIVEPANE00000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KDC4,
            key: KEYC_DC as i32 as u64
                | KEYC_SENT0000 as u64
                | KEYC_BUILD_MODIFIERS0000 as u64
                | CLIENT_ACTIVEPANE00000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KDC5,
            key: KEYC_DC as i32 as u64 | KEYC_VI0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KDC6,
            key: KEYC_DC as i32 as u64 | KEYC_SENT0000 as u64 | KEYC_VI0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KDC7,
            key: KEYC_DC as i32 as u64
                | KEYC_BUILD_MODIFIERS0000 as u64
                | CLIENT_ACTIVEPANE00000 as u64
                | KEYC_VI0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KIND,
            key: KEYC_DOWN as i32 as u64 | KEYC_SENT0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KDN2,
            key: KEYC_DOWN as i32 as u64 | KEYC_SENT0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KDN3,
            key: KEYC_DOWN as i32 as u64 | KEYC_BUILD_MODIFIERS0000 as u64 | CLIENT_ACTIVEPANE00000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KDN4,
            key: KEYC_DOWN as i32 as u64
                | KEYC_SENT0000 as u64
                | KEYC_BUILD_MODIFIERS0000 as u64
                | CLIENT_ACTIVEPANE00000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KDN5,
            key: KEYC_DOWN as i32 as u64 | KEYC_VI0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KDN6,
            key: KEYC_DOWN as i32 as u64 | KEYC_SENT0000 as u64 | KEYC_VI0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KDN7,
            key: KEYC_DOWN as i32 as u64
                | KEYC_BUILD_MODIFIERS0000 as u64
                | CLIENT_ACTIVEPANE00000 as u64
                | KEYC_VI0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KEND2,
            key: KEYC_END as i32 as u64 | KEYC_SENT0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KEND3,
            key: KEYC_END as i32 as u64 | KEYC_BUILD_MODIFIERS0000 as u64 | CLIENT_ACTIVEPANE00000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KEND4,
            key: KEYC_END as i32 as u64
                | KEYC_SENT0000 as u64
                | KEYC_BUILD_MODIFIERS0000 as u64
                | CLIENT_ACTIVEPANE00000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KEND5,
            key: KEYC_END as i32 as u64 | KEYC_VI0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KEND6,
            key: KEYC_END as i32 as u64 | KEYC_SENT0000 as u64 | KEYC_VI0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KEND7,
            key: KEYC_END as i32 as u64
                | KEYC_BUILD_MODIFIERS0000 as u64
                | CLIENT_ACTIVEPANE00000 as u64
                | KEYC_VI0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KHOM2,
            key: KEYC_HOME as i32 as u64 | KEYC_SENT0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KHOM3,
            key: KEYC_HOME as i32 as u64 | KEYC_BUILD_MODIFIERS0000 as u64 | CLIENT_ACTIVEPANE00000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KHOM4,
            key: KEYC_HOME as i32 as u64
                | KEYC_SENT0000 as u64
                | KEYC_BUILD_MODIFIERS0000 as u64
                | CLIENT_ACTIVEPANE00000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KHOM5,
            key: KEYC_HOME as i32 as u64 | KEYC_VI0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KHOM6,
            key: KEYC_HOME as i32 as u64 | KEYC_SENT0000 as u64 | KEYC_VI0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KHOM7,
            key: KEYC_HOME as i32 as u64
                | KEYC_BUILD_MODIFIERS0000 as u64
                | CLIENT_ACTIVEPANE00000 as u64
                | KEYC_VI0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KIC2,
            key: KEYC_IC as i32 as u64 | KEYC_SENT0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KIC3,
            key: KEYC_IC as i32 as u64 | KEYC_BUILD_MODIFIERS0000 as u64 | CLIENT_ACTIVEPANE00000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KIC4,
            key: KEYC_IC as i32 as u64
                | KEYC_SENT0000 as u64
                | KEYC_BUILD_MODIFIERS0000 as u64
                | CLIENT_ACTIVEPANE00000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KIC5,
            key: KEYC_IC as i32 as u64 | KEYC_VI0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KIC6,
            key: KEYC_IC as i32 as u64 | KEYC_SENT0000 as u64 | KEYC_VI0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KIC7,
            key: KEYC_IC as i32 as u64
                | KEYC_BUILD_MODIFIERS0000 as u64
                | CLIENT_ACTIVEPANE00000 as u64
                | KEYC_VI0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KLFT2,
            key: KEYC_LEFT as i32 as u64 | KEYC_SENT0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KLFT3,
            key: KEYC_LEFT as i32 as u64 | KEYC_BUILD_MODIFIERS0000 as u64 | CLIENT_ACTIVEPANE00000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KLFT4,
            key: KEYC_LEFT as i32 as u64
                | KEYC_SENT0000 as u64
                | KEYC_BUILD_MODIFIERS0000 as u64
                | CLIENT_ACTIVEPANE00000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KLFT5,
            key: KEYC_LEFT as i32 as u64 | KEYC_VI0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KLFT6,
            key: KEYC_LEFT as i32 as u64 | KEYC_SENT0000 as u64 | KEYC_VI0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KLFT7,
            key: KEYC_LEFT as i32 as u64
                | KEYC_BUILD_MODIFIERS0000 as u64
                | CLIENT_ACTIVEPANE00000 as u64
                | KEYC_VI0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KNXT2,
            key: KEYC_NPAGE as i32 as u64 | KEYC_SENT0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KNXT3,
            key: KEYC_NPAGE as i32 as u64 | KEYC_BUILD_MODIFIERS0000 as u64 | CLIENT_ACTIVEPANE00000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KNXT4,
            key: KEYC_NPAGE as i32 as u64
                | KEYC_SENT0000 as u64
                | KEYC_BUILD_MODIFIERS0000 as u64
                | CLIENT_ACTIVEPANE00000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KNXT5,
            key: KEYC_NPAGE as i32 as u64 | KEYC_VI0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KNXT6,
            key: KEYC_NPAGE as i32 as u64 | KEYC_SENT0000 as u64 | KEYC_VI0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KNXT7,
            key: KEYC_NPAGE as i32 as u64
                | KEYC_BUILD_MODIFIERS0000 as u64
                | CLIENT_ACTIVEPANE00000 as u64
                | KEYC_VI0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KPRV2,
            key: KEYC_PPAGE as i32 as u64 | KEYC_SENT0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KPRV3,
            key: KEYC_PPAGE as i32 as u64 | KEYC_BUILD_MODIFIERS0000 as u64 | CLIENT_ACTIVEPANE00000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KPRV4,
            key: KEYC_PPAGE as i32 as u64
                | KEYC_SENT0000 as u64
                | KEYC_BUILD_MODIFIERS0000 as u64
                | CLIENT_ACTIVEPANE00000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KPRV5,
            key: KEYC_PPAGE as i32 as u64 | KEYC_VI0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KPRV6,
            key: KEYC_PPAGE as i32 as u64 | KEYC_SENT0000 as u64 | KEYC_VI0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KPRV7,
            key: KEYC_PPAGE as i32 as u64
                | KEYC_BUILD_MODIFIERS0000 as u64
                | CLIENT_ACTIVEPANE00000 as u64
                | KEYC_VI0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KRIT2,
            key: KEYC_RIGHT as i32 as u64 | KEYC_SENT0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KRIT3,
            key: KEYC_RIGHT as i32 as u64 | KEYC_BUILD_MODIFIERS0000 as u64 | CLIENT_ACTIVEPANE00000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KRIT4,
            key: KEYC_RIGHT as i32 as u64
                | KEYC_SENT0000 as u64
                | KEYC_BUILD_MODIFIERS0000 as u64
                | CLIENT_ACTIVEPANE00000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KRIT5,
            key: KEYC_RIGHT as i32 as u64 | KEYC_VI0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KRIT6,
            key: KEYC_RIGHT as i32 as u64 | KEYC_SENT0000 as u64 | KEYC_VI0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KRIT7,
            key: KEYC_RIGHT as i32 as u64
                | KEYC_BUILD_MODIFIERS0000 as u64
                | CLIENT_ACTIVEPANE00000 as u64
                | KEYC_VI0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KRI,
            key: KEYC_UP as i32 as u64 | KEYC_SENT0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KUP2,
            key: KEYC_UP as i32 as u64 | KEYC_SENT0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KUP3,
            key: KEYC_UP as i32 as u64 | KEYC_BUILD_MODIFIERS0000 as u64 | CLIENT_ACTIVEPANE00000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KUP4,
            key: KEYC_UP as i32 as u64
                | KEYC_SENT0000 as u64
                | KEYC_BUILD_MODIFIERS0000 as u64
                | CLIENT_ACTIVEPANE00000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KUP5,
            key: KEYC_UP as i32 as u64 | KEYC_VI0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KUP6,
            key: KEYC_UP as i32 as u64 | KEYC_SENT0000 as u64 | KEYC_VI0000 as u64,
        };
        init
    },
    {
        let mut init = tty_default_key_code {
            code: TTYC_KUP7,
            key: KEYC_UP as i32 as u64
                | KEYC_BUILD_MODIFIERS0000 as u64
                | CLIENT_ACTIVEPANE00000 as u64
                | KEYC_VI0000 as u64,
        };
        init
    },
];
extern "C" fn tty_keys_add(mut tty: *mut tty, mut s: *const i8, mut key: key_code) {
    let mut tk: *mut tty_key = std::ptr::null_mut::<tty_key>();
    let mut size: size_t = 0;
    let mut keystr: *const i8 = std::ptr::null::<i8>();
    keystr = unsafe { key_string_lookup_key(key, 1) };
    tk = tty_keys_find(tty, s, unsafe { strlen(s) }, &mut size);
    if tk.is_null() {
        (unsafe {
            log_debug(
                b"new key %s: 0x%llx (%s)\0" as *const u8 as *const i8,
                s,
                key,
                keystr,
            )
        });
        tty_keys_add1(unsafe { &mut (*tty).key_tree }, s, key);
    } else {
        (unsafe {
            log_debug(
                b"replacing key %s: 0x%llx (%s)\0" as *const u8 as *const i8,
                s,
                key,
                keystr,
            )
        });
        (unsafe { (*tk).key = key });
    };
}
extern "C" fn tty_keys_add1(mut tkp: *mut *mut tty_key, mut s: *const i8, mut key: key_code) {
    let mut tk: *mut tty_key = std::ptr::null_mut::<tty_key>();
    tk = unsafe { *tkp };
    if tk.is_null() {
        (unsafe {
            *tkp = xcalloc(1 as i32 as size_t, ::core::mem::size_of::<tty_key>() as u64)
                as *mut tty_key
        });
        tk = unsafe { *tkp };
        (unsafe { (*tk).ch = *s });
        (unsafe { (*tk).key = 0xfe000000000 as u64 });
    }
    if (unsafe { *s }) as i32 == (unsafe { (*tk).ch }) as i32 {
        s = unsafe { s.offset(1) };
        if (unsafe { *s }) as i32 == '\0' as i32 {
            (unsafe { (*tk).key = key });
            return;
        }
        tkp = unsafe { &mut (*tk).next };
    } else if ((unsafe { *s }) as i32) < (unsafe { (*tk).ch }) as i32 {
        tkp = unsafe { &mut (*tk).left };
    } else if (unsafe { *s }) as i32 > (unsafe { (*tk).ch }) as i32 {
        tkp = unsafe { &mut (*tk).right };
    }
    tty_keys_add1(tkp, s, key);
}
#[no_mangle]
pub extern "C" fn tty_keys_build(mut tty: *mut tty) {
    let mut tdkr: *const tty_default_key_raw = std::ptr::null::<tty_default_key_raw>();
    let mut tdkx: *const tty_default_key_xterm = std::ptr::null::<tty_default_key_xterm>();
    let mut tdkc: *const tty_default_key_code = std::ptr::null::<tty_default_key_code>();
    let mut i: u_int = 0;
    let mut j: u_int = 0;
    let mut s: *const i8 = std::ptr::null::<i8>();
    let mut o: *mut options_entry = std::ptr::null_mut::<options_entry>();
    let mut a: *mut options_array_item = std::ptr::null_mut::<options_array_item>();
    let mut ov: *mut options_value = std::ptr::null_mut::<options_value>();
    let mut copy: [i8; 16] = [0; 16];
    let mut key: key_code = 0;
    if !(unsafe { (*tty).key_tree }).is_null() {
        tty_keys_free(tty);
    }
    (unsafe { (*tty).key_tree = std::ptr::null_mut::<tty_key>() });
    i = 0 as u_int;
    while (i as u64)
        < (::core::mem::size_of::<[tty_default_key_xterm; 30]>() as u64)
            .wrapping_div(::core::mem::size_of::<tty_default_key_xterm>() as u64)
    {
        tdkx = (unsafe { &*tty_default_xterm_keys.as_ptr().offset(i as isize) })
            as *const tty_default_key_xterm;
        j = 2 as u_int;
        while (j as u64)
            < (::core::mem::size_of::<[key_code; 10]>() as u64)
                .wrapping_div(::core::mem::size_of::<key_code>() as u64)
        {
            (unsafe {
                strlcpy(
                    copy.as_mut_ptr(),
                    (*tdkx).template,
                    ::core::mem::size_of::<[i8; 16]>() as u64,
                )
            });
            copy[(unsafe { strcspn(copy.as_mut_ptr(), b"_\0" as *const u8 as *const i8) })
                as usize] = ('0' as i32 as u32).wrapping_add(j) as i8;
            key = (unsafe { (*tdkx).key }) | (unsafe { tty_default_xterm_modifiers[j as usize] });
            tty_keys_add(tty, copy.as_mut_ptr(), key);
            j = j.wrapping_add(1);
        }
        i = i.wrapping_add(1);
    }
    i = 0 as u_int;
    while (i as u64)
        < (::core::mem::size_of::<[tty_default_key_raw; 100]>() as u64)
            .wrapping_div(::core::mem::size_of::<tty_default_key_raw>() as u64)
    {
        tdkr = (unsafe { &*tty_default_raw_keys.as_ptr().offset(i as isize) })
            as *const tty_default_key_raw;
        s = unsafe { (*tdkr).string };
        if (unsafe { *s }) as i32 != '\0' as i32 {
            tty_keys_add(tty, s, unsafe { (*tdkr).key });
        }
        i = i.wrapping_add(1);
    }
    i = 0 as u_int;
    while (i as u64)
        < (::core::mem::size_of::<[tty_default_key_code; 136]>() as u64)
            .wrapping_div(::core::mem::size_of::<tty_default_key_code>() as u64)
    {
        tdkc = (unsafe { &*tty_default_code_keys.as_ptr().offset(i as isize) })
            as *const tty_default_key_code;
        s = unsafe { tty_term_string((*tty).term, (*tdkc).code) };
        if (unsafe { *s }) as i32 != '\0' as i32 {
            tty_keys_add(tty, s, unsafe { (*tdkc).key });
        }
        i = i.wrapping_add(1);
    }
    o = unsafe { options_get(global_options, b"user-keys\0" as *const u8 as *const i8) };
    if !o.is_null() {
        a = unsafe { options_array_first(o) };
        while !a.is_null() {
            i = unsafe { options_array_item_index(a) };
            ov = unsafe { options_array_item_value(a) };
            tty_keys_add(
                tty,
                unsafe { (*ov).string },
                (0x10f000 as u64).wrapping_add(i as u64),
            );
            a = unsafe { options_array_next(a) };
        }
    }
}
#[no_mangle]
pub extern "C" fn tty_keys_free(mut tty: *mut tty) {
    tty_keys_free1(unsafe { (*tty).key_tree });
}
extern "C" fn tty_keys_free1(mut tk: *mut tty_key) {
    if !(unsafe { (*tk).next }).is_null() {
        tty_keys_free1(unsafe { (*tk).next });
    }
    if !(unsafe { (*tk).left }).is_null() {
        tty_keys_free1(unsafe { (*tk).left });
    }
    if !(unsafe { (*tk).right }).is_null() {
        tty_keys_free1(unsafe { (*tk).right });
    }
    (unsafe { free(tk as *mut ()) });
}
extern "C" fn tty_keys_find(
    mut tty: *mut tty,
    mut buf: *const i8,
    mut len: size_t,
    mut size: *mut size_t,
) -> *mut tty_key {
    (unsafe { *size = 0 as size_t });
    return tty_keys_find1(unsafe { (*tty).key_tree }, buf, len, size);
}
extern "C" fn tty_keys_find1(
    mut tk: *mut tty_key,
    mut buf: *const i8,
    mut len: size_t,
    mut size: *mut size_t,
) -> *mut tty_key {
    if len == 0 as u64 {
        return std::ptr::null_mut::<tty_key>();
    }
    if tk.is_null() {
        return std::ptr::null_mut::<tty_key>();
    }
    if (unsafe { (*tk).ch }) as i32 == (unsafe { *buf }) as i32 {
        buf = unsafe { buf.offset(1) };
        len = len.wrapping_sub(1);
        (unsafe { *size = (*size).wrapping_add(1) });
        if len == 0 as u64
            || (unsafe { (*tk).next }).is_null() && (unsafe { (*tk).key }) != 0xfe000000000 as u64
        {
            return tk;
        }
        tk = unsafe { (*tk).next };
    } else if ((unsafe { *buf }) as i32) < (unsafe { (*tk).ch }) as i32 {
        tk = unsafe { (*tk).left };
    } else if (unsafe { *buf }) as i32 > (unsafe { (*tk).ch }) as i32 {
        tk = unsafe { (*tk).right };
    }
    return tty_keys_find1(tk, buf, len, size);
}
extern "C" fn tty_keys_next1(
    mut tty: *mut tty,
    mut buf: *const i8,
    mut len: size_t,
    mut key: *mut key_code,
    mut size: *mut size_t,
    mut expired: i32,
) -> i32 {
    let mut c: *mut client = unsafe { (*tty).client };
    let mut tk: *mut tty_key = std::ptr::null_mut::<tty_key>();
    let mut tk1: *mut tty_key = std::ptr::null_mut::<tty_key>();
    let mut ud: utf8_data = utf8_data {
        data: [0; 21],
        have: 0,
        size: 0,
        width: 0,
    };
    let mut more: utf8_state = UTF8_MORE;
    let mut uc: utf8_char = 0;
    let mut i: u_int = 0;
    (unsafe {
        log_debug(
            b"%s: next key is %zu (%.*s) (expired=%d)\0" as *const u8 as *const i8,
            (*c).name,
            len,
            len as i32,
            buf,
            expired,
        )
    });
    tk = tty_keys_find(tty, buf, len, size);
    if !tk.is_null() && (unsafe { (*tk).key }) != 0xfe000000000 as u64 {
        tk1 = tk;
        loop {
            (unsafe {
                log_debug(
                    b"%s: keys in list: %#llx\0" as *const u8 as *const i8,
                    (*c).name,
                    (*tk1).key,
                )
            });
            tk1 = unsafe { (*tk1).next };
            if tk1.is_null() {
                break;
            }
        }
        if !(unsafe { (*tk).next }).is_null() && expired == 0 {
            return 1;
        }
        (unsafe { *key = (*tk).key });
        return 0;
    }
    more = unsafe { utf8_open(&mut ud, *buf as u_char) };
    if more as u32 == UTF8_MORE as i32 as u32 {
        (unsafe { *size = ud.size as size_t });
        if len < ud.size as u64 {
            if expired == 0 {
                return 1;
            }
            return -(1 as i32);
        }
        i = 1 as u_int;
        while i < ud.size as u32 {
            more = unsafe { utf8_append(&mut ud, *buf.offset(i as isize) as u_char) };
            i = i.wrapping_add(1);
        }
        if more as u32 != UTF8_DONE as i32 as u32 {
            return -(1 as i32);
        }
        if (unsafe { utf8_from_data(&mut ud, &mut uc) }) as u32 != UTF8_DONE as i32 as u32 {
            return -(1 as i32);
        }
        (unsafe { *key = uc as key_code });
        (unsafe {
            log_debug(
                b"%s: UTF-8 key %.*s %#llx\0" as *const u8 as *const i8,
                (*c).name,
                ud.size as i32,
                (ud.data).as_mut_ptr(),
                *key,
            )
        });
        return 0;
    }
    return -(1 as i32);
}
extern "C" fn tty_keys_winsz(
    mut tty: *mut tty,
    mut buf: *const i8,
    mut len: size_t,
    mut size: *mut size_t,
) -> i32 {
    let mut c: *mut client = unsafe { (*tty).client };
    let mut end: size_t = 0;
    let mut tmp: [i8; 64] = [0; 64];
    let mut sx: u_int = 0;
    let mut sy: u_int = 0;
    let mut xpixel: u_int = 0;
    let mut ypixel: u_int = 0;
    let mut char_x: u_int = 0;
    let mut char_y: u_int = 0;
    (unsafe { *size = 0 as size_t });
    if (unsafe { (*tty).flags }) & 0x1000 as i32 == 0 {
        return -(1 as i32);
    }
    if (unsafe { *buf.offset(0 as i32 as isize) }) as i32 != '\u{1b}' as i32 {
        return -(1 as i32);
    }
    if len == 1 as u64 {
        return 1;
    }
    if (unsafe { *buf.offset(1 as i32 as isize) }) as i32 != '[' as i32 {
        return -(1 as i32);
    }
    if len == 2 as u64 {
        return 1;
    }
    end = 2 as size_t;
    while end < len && end != ::core::mem::size_of::<[i8; 64]>() as u64 {
        if (unsafe { *buf.offset(end as isize) }) as i32 == 't' as i32 {
            break;
        }
        if (unsafe {
            *(*__ctype_b_loc()).offset(*buf.offset(end as isize) as u_char as i32 as isize)
        }) as i32
            & _ISdigit as i32 as u16 as i32
            == 0
            && (unsafe { *buf.offset(end as isize) }) as i32 != ';' as i32
        {
            break;
        }
        end = end.wrapping_add(1);
    }
    if end == len {
        return 1;
    }
    if end == ::core::mem::size_of::<[i8; 64]>() as u64
        || (unsafe { *buf.offset(end as isize) }) as i32 != 't' as i32
    {
        return -(1 as i32);
    }
    (unsafe {
        memcpy(
            tmp.as_mut_ptr() as *mut (),
            buf.offset(2 as i32 as isize) as *const (),
            end.wrapping_sub(2 as i32 as u64),
        )
    });
    tmp[end.wrapping_sub(2 as i32 as u64) as usize] = '\0' as i32 as i8;
    if (unsafe {
        sscanf(
            tmp.as_mut_ptr(),
            b"8;%u;%u\0" as *const u8 as *const i8,
            &mut sy as *mut u_int,
            &mut sx as *mut u_int,
        )
    }) == 2
    {
        (unsafe { tty_set_size(tty, sx, sy, (*tty).xpixel, (*tty).ypixel) });
        (unsafe { *size = end.wrapping_add(1 as i32 as u64) });
        return 0;
    } else {
        if (unsafe {
            sscanf(
                tmp.as_mut_ptr(),
                b"4;%u;%u\0" as *const u8 as *const i8,
                &mut ypixel as *mut u_int,
                &mut xpixel as *mut u_int,
            )
        }) == 2
        {
            char_x = if xpixel != 0 && (unsafe { (*tty).sx }) != 0 {
                xpixel.wrapping_div(unsafe { (*tty).sx })
            } else { 0 as u32
            };
            char_y = if ypixel != 0 && (unsafe { (*tty).sy }) != 0 {
                ypixel.wrapping_div(unsafe { (*tty).sy })
            } else { 0 as u32
            };
            (unsafe { tty_set_size(tty, (*tty).sx, (*tty).sy, char_x, char_y) });
            (unsafe { tty_invalidate(tty) });
            (unsafe { (*tty).flags &= !(0x1000 as i32) });
            (unsafe { *size = end.wrapping_add(1 as i32 as u64) });
            return 0;
        }
    }
    (unsafe {
        log_debug(
            b"%s: unrecognized window size sequence: %s\0" as *const u8 as *const i8,
            (*c).name,
            tmp.as_mut_ptr(),
        )
    });
    return -(1 as i32);
}
#[no_mangle]
pub extern "C" fn tty_keys_next(mut tty: *mut tty) -> i32 {
    let mut current_block: u64;
    let mut c: *mut client = unsafe { (*tty).client };
    let mut tv: timeval = timeval {
        tv_sec: 0,
        tv_usec: 0,
    };
    let mut buf: *const i8 = std::ptr::null::<i8>();
    let mut len: size_t = 0;
    let mut size: size_t = 0;
    let mut bspace: cc_t = 0;
    let mut delay: i32 = 0;
    let mut expired: i32 = 0;
    let mut n: i32 = 0;
    let mut key: key_code = 0;
    let mut onlykey: key_code = 0;
    let mut m: mouse_event = {
        let mut init = mouse_event {
            valid: 0,
            ignore: 0,
            key: 0,
            statusat: 0,
            statuslines: 0,
            x: 0,
            y: 0,
            b: 0,
            lx: 0,
            ly: 0,
            lb: 0,
            ox: 0,
            oy: 0,
            s: 0,
            w: 0,
            wp: 0,
            sgr_type: 0,
            sgr_b: 0,
        };
        init
    };
    let mut event: *mut key_event = std::ptr::null_mut::<key_event>();
    buf = (unsafe { evbuffer_pullup((*tty).in_0, -(1 as i32) as ssize_t) }) as *const i8;
    len = unsafe { evbuffer_get_length((*tty).in_0) };
    if len == 0 as u64 {
        return 0;
    }
    (unsafe {
        log_debug(
            b"%s: keys are %zu (%.*s)\0" as *const u8 as *const i8,
            (*c).name,
            len,
            len as i32,
            buf,
        )
    });
    match tty_keys_clipboard(tty, buf, len, &mut size) {
        0 => {
            key = 0xfe000000000 as u64;
            current_block = 3227580519196833052;
        }
        -1 => {
            current_block = 1917311967535052937;
        }
        1 => {
            current_block = 17993185483580959089;
        }
        _ => {
            current_block = 1917311967535052937;
        }
    }
    match current_block {
        1917311967535052937 => {
            match tty_keys_device_attributes(tty, buf, len, &mut size) {
                0 => {
                    key = 0xfe000000000 as u64;
                    current_block = 3227580519196833052;
                }
                -1 => {
                    current_block = 4166486009154926805;
                }
                1 => {
                    current_block = 17993185483580959089;
                }
                _ => {
                    current_block = 4166486009154926805;
                }
            }
            match current_block {
                3227580519196833052 => {}
                17993185483580959089 => {}
                _ => {
                    match tty_keys_device_attributes2(tty, buf, len, &mut size) {
                        0 => {
                            key = 0xfe000000000 as u64;
                            current_block = 3227580519196833052;
                        }
                        -1 => {
                            current_block = 15652330335145281839;
                        }
                        1 => {
                            current_block = 17993185483580959089;
                        }
                        _ => {
                            current_block = 15652330335145281839;
                        }
                    }
                    match current_block {
                        3227580519196833052 => {}
                        17993185483580959089 => {}
                        _ => {
                            match tty_keys_extended_device_attributes(tty, buf, len, &mut size) {
                                0 => {
                                    key = 0xfe000000000 as u64;
                                    current_block = 3227580519196833052;
                                }
                                -1 => {
                                    current_block = 224731115979188411;
                                }
                                1 => {
                                    current_block = 17993185483580959089;
                                }
                                _ => {
                                    current_block = 224731115979188411;
                                }
                            }
                            match current_block {
                                3227580519196833052 => {}
                                17993185483580959089 => {}
                                _ => {
                                    match tty_keys_colours(
                                        tty,
                                        buf,
                                        len,
                                        &mut size,
                                        unsafe { &mut (*tty).fg },
                                        unsafe { &mut (*tty).bg },
                                    ) {
                                        0 => {
                                            key = 0xfe000000000 as u64;
                                            current_block = 3227580519196833052;
                                        }
                                        -1 => {
                                            current_block = 17478428563724192186;
                                        }
                                        1 => {
                                            current_block = 17993185483580959089;
                                        }
                                        _ => {
                                            current_block = 17478428563724192186;
                                        }
                                    }
                                    match current_block {
                                        3227580519196833052 => {}
                                        17993185483580959089 => {}
                                        _ => {
                                            match tty_keys_mouse(tty, buf, len, &mut size, &mut m) {
                                                0 => {
                                                    key = KEYC_MOUSE as i32 as key_code;
                                                    current_block = 3227580519196833052;
                                                }
                                                -1 => {
                                                    current_block = 4488286894823169796;
                                                }
                                                -2 => {
                                                    key = KEYC_MOUSE as i32 as key_code;
                                                    (unsafe {
                                                        log_debug(
                                                            b"%s: discard key %.*s %#llx\0"
                                                                as *const u8
                                                                as *const i8,
                                                            (*c).name,
                                                            size as i32,
                                                            buf,
                                                            key,
                                                        )
                                                    });
                                                    (unsafe { evbuffer_drain((*tty).in_0, size) });
                                                    return 1;
                                                }
                                                1 => {
                                                    current_block = 17993185483580959089;
                                                }
                                                _ => {
                                                    current_block = 4488286894823169796;
                                                }
                                            }
                                            match current_block {
                                                3227580519196833052 => {}
                                                17993185483580959089 => {}
                                                _ => {
                                                    match tty_keys_extended_key(
                                                        tty, buf, len, &mut size, &mut key,
                                                    ) {
                                                        0 => {
                                                            current_block = 3227580519196833052;
                                                        }
                                                        -1 => {
                                                            current_block = 3275366147856559585;
                                                        }
                                                        1 => {
                                                            current_block = 17993185483580959089;
                                                        }
                                                        _ => {
                                                            current_block = 3275366147856559585;
                                                        }
                                                    }
                                                    match current_block {
                                                        3227580519196833052 => {}
                                                        17993185483580959089 => {}
                                                        _ => {
                                                            match tty_keys_winsz(
                                                                tty, buf, len, &mut size,
                                                            ) {
                                                                0 => {
                                                                    current_block =
                                                                        14770841453254261346;
                                                                    match current_block {
                                                                        149607435152215408 => {
                                                                            current_block = 17993185483580959089 ;
                                                                        }
                                                                        _ => {
                                                                            key = 0xfe000000000
                                                                                as u64;
                                                                            current_block =
                                                                                3227580519196833052;
                                                                        }
                                                                    }
                                                                }
                                                                1 => {
                                                                    current_block =
                                                                        149607435152215408;
                                                                    match current_block {
                                                                        149607435152215408 => {
                                                                            current_block = 17993185483580959089 ;
                                                                        }
                                                                        _ => {
                                                                            key = 0xfe000000000
                                                                                as u64;
                                                                            current_block =
                                                                                3227580519196833052;
                                                                        }
                                                                    }
                                                                }
                                                                -1 | _ => {
                                                                    current_block =
                                                                        8439342874223447642;
                                                                }
                                                            }
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
        _ => {}
    }
    loop {
        match current_block {
            8439342874223447642 => {
                n = tty_keys_next1(tty, buf, len, &mut key, &mut size, expired);
                if n == 0 {
                    current_block = 3227580519196833052;
                    continue;
                }
                if n == 1 {
                    current_block = 17993185483580959089;
                    continue;
                }
                if (unsafe { *buf }) as i32 == '\u{1b}' as i32 && len > 1 as u64 {
                    n = tty_keys_next1(
                        tty,
                        unsafe { buf.offset(1 as i32 as isize) },
                        len.wrapping_sub(1 as i32 as u64),
                        &mut key,
                        &mut size,
                        expired,
                    );
                    if n == 0 {
                        if key & CLIENT_ACTIVEPANE00000 as u64 != 0 {
                            key = '\u{1b}' as i32 as key_code;
                            size = 1 as size_t;
                            current_block = 3227580519196833052;
                            continue;
                        } else {
                            key |= KEYC_BUILD_MODIFIERS0000 as u64;
                            size = size.wrapping_add(1);
                            current_block = 3227580519196833052;
                            continue;
                        }
                    } else if n == 1 {
                        current_block = 17993185483580959089;
                        continue;
                    }
                }
                if (unsafe { *buf }) as i32 == '\u{1b}' as i32 && len >= 2 as u64 {
                    key = (unsafe { *buf.offset(1 as i32 as isize) }) as u_char as u64
                        | KEYC_BUILD_MODIFIERS0000 as u64;
                    size = 2 as size_t;
                } else {
                    key = (unsafe { *buf.offset(0 as i32 as isize) }) as u_char as key_code;
                    size = 1 as size_t;
                }
                if key & 0xfffffffffff as u64 == C0_NUL as i32 as u64 {
                    key = ' ' as i32 as u64 | KEYC_VI0000 as u64 | key & KEYC_BUILD_MODIFIERS0000 as u64;
                }
                onlykey = key & 0xfffffffffff as u64;
                if onlykey < 0x20 as i32 as u64
                    && onlykey != C0_HT as i32 as u64
                    && onlykey != C0_CR as i32 as u64
                    && onlykey != C0_ESC as i32 as u64
                {
                    onlykey |= 0x40 as i32 as u64;
                    if onlykey >= 'A' as i32 as u64 && onlykey <= 'Z' as i32 as u64 {
                        onlykey |= 0x20 as i32 as u64;
                    }
                    key = onlykey | KEYC_VI0000 as u64 | key & KEYC_BUILD_MODIFIERS0000 as u64;
                }
                current_block = 3227580519196833052;
            }
            3227580519196833052 => {
                (unsafe {
                    log_debug(
                        b"%s: complete key %.*s %#llx\0" as *const u8 as *const i8,
                        (*c).name,
                        size as i32,
                        buf,
                        key,
                    )
                });
                bspace = unsafe { (*tty).tio.c_cc[2 as i32 as usize] };
                if bspace as i32 != '\0' as i32 && key & 0xfffffffffff as u64 == bspace as u64 {
                    key = key & 0xf00000000000 as u64 | KEYC_BSPACE as i32 as u64;
                }
                if (unsafe { event_initialized(&mut (*tty).key_timer) }) != 0 {
                    (unsafe { event_del(&mut (*tty).key_timer) });
                }
                (unsafe { (*tty).flags &= !(0x4 as i32) });
                if key == KEYC_FOCUS_OUT as i32 as u64 {
                    (unsafe { (*c).flags &= !(0x8000 as i32) as u64 });
                    (unsafe { window_update_focus((*(*(*c).session).curw).window) });
                    (unsafe { notify_client(b"client-focus-out\0" as *const u8 as *const i8, c) });
                } else if key == KEYC_FOCUS_IN as i32 as u64 {
                    (unsafe { (*c).flags |= 0x8000 as i32 as u64 });
                    (unsafe { notify_client(b"client-focus-in\0" as *const u8 as *const i8, c) });
                    (unsafe { window_update_focus((*(*(*c).session).curw).window) });
                }
                if key != 0xfe000000000 as u64 {
                    event = (unsafe {
                        xcalloc( 1 as size_t,
                            ::core::mem::size_of::<key_event>() as u64,
                        )
                    }) as *mut key_event;
                    (unsafe { (*event).key = key });
                    (unsafe {
                        memcpy(
                            &mut (*event).m as *mut mouse_event as *mut (),
                            &mut m as *mut mouse_event as *const (),
                            ::core::mem::size_of::<mouse_event>() as u64,
                        )
                    });
                    (unsafe { (*event).buf = xmalloc(size) as *mut i8 });
                    (unsafe { (*event).len = size });
                    (unsafe {
                        memcpy(
                            (*event).buf as *mut (),
                            buf as *const (),
                            (*event).len,
                        )
                    });
                    if (unsafe { server_client_handle_key(c, event) }) == 0 {
                        (unsafe { free((*event).buf as *mut ()) });
                        (unsafe { free(event as *mut ()) });
                    }
                }
                (unsafe { evbuffer_drain((*tty).in_0, size) });
                return 1;
            }
            _ => {
                (unsafe {
                    log_debug(
                        b"%s: partial key %.*s\0" as *const u8 as *const i8,
                        (*c).name,
                        len as i32,
                        buf,
                    )
                });
                if (unsafe { (*tty).flags }) & 0x4 as i32 != 0 {
                    if (unsafe { event_initialized(&mut (*tty).key_timer) }) != 0
                        && (unsafe {
                            event_pending(
                                &mut (*tty).key_timer,
                                0x1 as i32 as i16,
                                std::ptr::null_mut::<timeval>(),
                            )
                        }) == 0
                    {
                        expired = 1;
                        current_block = 8439342874223447642;
                    } else {
                        return 0;
                    }
                } else {
                    delay = (unsafe {
                        options_get_number(
                            global_options,
                            b"escape-time\0" as *const u8 as *const i8,
                        )
                    }) as i32;
                    if delay == 0 {
                        delay = 1;
                    }
                    tv.tv_sec = (delay / 1000) as __time_t;
                    tv.tv_usec = (delay % 1000) as i64 * 1000;
                    if (unsafe { event_initialized(&mut (*tty).key_timer) }) != 0 {
                        (unsafe { event_del(&mut (*tty).key_timer) });
                    }
                    (unsafe {
                        event_set(
                            &mut (*tty).key_timer,
                            -(1 as i32), 0 as i16,
                            Some(
                                tty_keys_callback
                                    as unsafe extern "C" fn(i32, i16, *mut ()) -> (),
                            ),
                            tty as *mut (),
                        )
                    });
                    (unsafe { event_add(&mut (*tty).key_timer, &mut tv) });
                    (unsafe { (*tty).flags |= 0x4 as i32 });
                    return 0;
                }
            }
        }
    }
}
extern "C" fn tty_keys_callback(mut _fd: i32, mut _events: i16, mut data: *mut ()) {
    let mut tty: *mut tty = data as *mut tty;
    if (unsafe { (*tty).flags }) & 0x4 as i32 != 0 {
        while tty_keys_next(tty) != 0 {}
    }
}
extern "C" fn tty_keys_extended_key(
    mut tty: *mut tty,
    mut buf: *const i8,
    mut len: size_t,
    mut size: *mut size_t,
    mut key: *mut key_code,
) -> i32 {
    let mut c: *mut client = unsafe { (*tty).client };
    let mut end: size_t = 0;
    let mut number: u_int = 0;
    let mut modifiers: u_int = 0;
    let mut tmp: [i8; 64] = [0; 64];
    let mut bspace: cc_t = 0;
    let mut nkey: key_code = 0;
    let mut onlykey: key_code = 0;
    let mut ud: utf8_data = utf8_data {
        data: [0; 21],
        have: 0,
        size: 0,
        width: 0,
    };
    let mut uc: utf8_char = 0;
    (unsafe { *size = 0 as size_t });
    if (unsafe { *buf.offset(0 as i32 as isize) }) as i32 != '\u{1b}' as i32 {
        return -(1 as i32);
    }
    if len == 1 as u64 {
        return 1;
    }
    if (unsafe { *buf.offset(1 as i32 as isize) }) as i32 != '[' as i32 {
        return -(1 as i32);
    }
    if len == 2 as u64 {
        return 1;
    }
    end = 2 as size_t;
    while end < len && end != ::core::mem::size_of::<[i8; 64]>() as u64 {
        if (unsafe { *buf.offset(end as isize) }) as i32 == '~' as i32 {
            break;
        }
        if (unsafe {
            *(*__ctype_b_loc()).offset(*buf.offset(end as isize) as u_char as i32 as isize)
        }) as i32
            & _ISdigit as i32 as u16 as i32
            == 0
            && (unsafe { *buf.offset(end as isize) }) as i32 != ';' as i32
        {
            break;
        }
        end = end.wrapping_add(1);
    }
    if end == len {
        return 1;
    }
    if end == ::core::mem::size_of::<[i8; 64]>() as u64
        || (unsafe { *buf.offset(end as isize) }) as i32 != '~' as i32
            && (unsafe { *buf.offset(end as isize) }) as i32 != 'u' as i32
    {
        return -(1 as i32);
    }
    (unsafe {
        memcpy(
            tmp.as_mut_ptr() as *mut (),
            buf.offset(2 as i32 as isize) as *const (),
            end,
        )
    });
    tmp[end as usize] = '\0' as i32 as i8;
    if (unsafe { *buf.offset(end as isize) }) as i32 == '~' as i32 {
        if (unsafe {
            sscanf(
                tmp.as_mut_ptr(),
                b"27;%u;%u\0" as *const u8 as *const i8,
                &mut modifiers as *mut u_int,
                &mut number as *mut u_int,
            )
        }) != 2
        {
            return -(1 as i32);
        }
    } else if (unsafe {
        sscanf(
            tmp.as_mut_ptr(),
            b"%u;%u\0" as *const u8 as *const i8,
            &mut number as *mut u_int,
            &mut modifiers as *mut u_int,
        )
    }) != 2
    {
        return -(1 as i32);
    }
    (unsafe { *size = end.wrapping_add(1 as i32 as u64) });
    bspace = unsafe { (*tty).tio.c_cc[2 as i32 as usize] };
    if bspace as i32 != '\0' as i32 && number == bspace as u32 {
        nkey = KEYC_BSPACE as i32 as key_code;
    } else {
        nkey = number as key_code;
    }
    if nkey != KEYC_BSPACE as i32 as u64 && nkey & !(0x7f as i32) as u64 != 0 {
        if (unsafe { utf8_fromwc(nkey as wchar_t, &mut ud) }) as u32 == UTF8_DONE as i32 as u32
            && (unsafe { utf8_from_data(&mut ud, &mut uc) }) as u32 == UTF8_DONE as i32 as u32
        {
            nkey = uc as key_code;
        } else {
            return -(1 as i32);
        }
    }
    if modifiers > 0 as u32 {
        modifiers = modifiers.wrapping_sub(1);
        if modifiers & 1 as u32 != 0 {
            nkey |= KEYC_SENT0000 as u64;
        }
        if modifiers & 2 as u32 != 0 {
            nkey |= KEYC_BUILD_MODIFIERS0000 as u64 | CLIENT_ACTIVEPANE00000 as u64;
        }
        if modifiers & 4 as u32 != 0 {
            nkey |= KEYC_VI0000 as u64;
        }
        if modifiers & 8 as u32 != 0 {
            nkey |= KEYC_BUILD_MODIFIERS0000 as u64 | CLIENT_ACTIVEPANE00000 as u64;
        }
    }
    if nkey & 0xfffffffffff as u64 == '\t' as i32 as u64 && nkey & KEYC_SENT0000 as u64 != 0 {
        nkey = KEYC_BTAB as i32 as u64 | nkey & !(0xfffffffffff as u64) & !(KEYC_SENT0000 as u64);
    }
    onlykey = nkey & 0xfffffffffff as u64;
    if (onlykey > 0x20 as i32 as u64 && onlykey < 0x7f as i32 as u64
        || nkey & 0xfffffffffff as u64 > 0x7f as i32 as u64
            && ((nkey & 0xfffffffffff as u64) < 0x10e000 as u64
                || nkey & 0xfffffffffff as u64 >= KEYC_BASE_END as i32 as u64)
            && ((nkey & 0xfffffffffff as u64) < 0x10f000 as u64
                || nkey & 0xfffffffffff as u64
                    >= (0x10f000 as u64).wrapping_add(1000 as i32 as u64)))
        && nkey & 0xf00000000000 as u64 == KEYC_SENT0000 as u64
    {
        nkey &= !(KEYC_SENT0000 as u64);
    }
    if (unsafe { log_get_level() }) != 0 {
        (unsafe {
            log_debug(
                b"%s: extended key %.*s is %llx (%s)\0" as *const u8 as *const i8,
                (*c).name,
                *size as i32,
                buf,
                nkey,
                key_string_lookup_key(nkey, 1),
            )
        });
    }
    (unsafe { *key = nkey });
    return 0;
}
extern "C" fn tty_keys_mouse(
    mut tty: *mut tty,
    mut buf: *const i8,
    mut len: size_t,
    mut size: *mut size_t,
    mut m: *mut mouse_event,
) -> i32 {
    let mut c: *mut client = unsafe { (*tty).client };
    let mut i: u_int = 0;
    let mut x: u_int = 0;
    let mut y: u_int = 0;
    let mut b: u_int = 0;
    let mut sgr_b: u_int = 0;
    let mut sgr_type: u_char = 0;
    let mut ch: u_char = 0;
    (unsafe { *size = 0 as size_t });
    sgr_b = 0 as u_int;
    b = sgr_b;
    y = b;
    x = y;
    sgr_type = ' ' as i32 as u_char;
    if (unsafe { *buf.offset(0 as i32 as isize) }) as i32 != '\u{1b}' as i32 {
        return -(1 as i32);
    }
    if len == 1 as u64 {
        return 1;
    }
    if (unsafe { *buf.offset(1 as i32 as isize) }) as i32 != '[' as i32 {
        return -(1 as i32);
    }
    if len == 2 as u64 {
        return 1;
    }
    if (unsafe { *buf.offset(2 as i32 as isize) }) as i32 == 'M' as i32 {
        (unsafe { *size = 3 as size_t });
        i = 0 as u_int;
        while i < 3 as u32 {
            if len <= (unsafe { *size }) {
                return 1;
            }
            let fresh0 = unsafe { *size };
            (unsafe { *size = (*size).wrapping_add(1) });
            ch = (unsafe { *buf.offset(fresh0 as isize) }) as u_char;
            if i == 0 as u32 {
                b = ch as u_int;
            } else if i == 1 as u32 {
                x = ch as u_int;
            } else {
                y = ch as u_int;
            }
            i = i.wrapping_add(1);
        }
        (unsafe {
            log_debug(
                b"%s: mouse input: %.*s\0" as *const u8 as *const i8,
                (*c).name,
                *size as i32,
                buf,
            )
        });
        if b < 0x20 as i32 as u32 || x < 0x21 as i32 as u32 || y < 0x21 as i32 as u32 {
            return -(2 as i32);
        }
        b = (b as u32).wrapping_sub(0x20 as i32 as u32) as u_int as u_int;
        x = (x as u32).wrapping_sub(0x21 as i32 as u32) as u_int as u_int;
        y = (y as u32).wrapping_sub(0x21 as i32 as u32) as u_int as u_int;
    } else if (unsafe { *buf.offset(2 as i32 as isize) }) as i32 == '<' as i32 {
        (unsafe { *size = 3 as size_t });
        loop {
            if len <= (unsafe { *size }) {
                return 1;
            }
            let fresh1 = unsafe { *size };
            (unsafe { *size = (*size).wrapping_add(1) });
            ch = (unsafe { *buf.offset(fresh1 as isize) }) as u_char;
            if ch as i32 == ';' as i32 {
                break;
            }
            if (ch as i32) < '0' as i32 || ch as i32 > '9' as i32 {
                return -(1 as i32);
            }
            sgr_b = (10 as i32 as u32)
                .wrapping_mul(sgr_b)
                .wrapping_add((ch as i32 - '0' as i32) as u32);
        }
        loop {
            if len <= (unsafe { *size }) {
                return 1;
            }
            let fresh2 = unsafe { *size };
            (unsafe { *size = (*size).wrapping_add(1) });
            ch = (unsafe { *buf.offset(fresh2 as isize) }) as u_char;
            if ch as i32 == ';' as i32 {
                break;
            }
            if (ch as i32) < '0' as i32 || ch as i32 > '9' as i32 {
                return -(1 as i32);
            }
            x = (10 as i32 as u32)
                .wrapping_mul(x)
                .wrapping_add((ch as i32 - '0' as i32) as u32);
        }
        loop {
            if len <= (unsafe { *size }) {
                return 1;
            }
            let fresh3 = unsafe { *size };
            (unsafe { *size = (*size).wrapping_add(1) });
            ch = (unsafe { *buf.offset(fresh3 as isize) }) as u_char;
            if ch as i32 == 'M' as i32 || ch as i32 == 'm' as i32 {
                break;
            }
            if (ch as i32) < '0' as i32 || ch as i32 > '9' as i32 {
                return -(1 as i32);
            }
            y = (10 as i32 as u32)
                .wrapping_mul(y)
                .wrapping_add((ch as i32 - '0' as i32) as u32);
        }
        (unsafe {
            log_debug(
                b"%s: mouse input (SGR): %.*s\0" as *const u8 as *const i8,
                (*c).name,
                *size as i32,
                buf,
            )
        });
        if x < 1 as u32 || y < 1 as u32 {
            return -(2 as i32);
        }
        x = x.wrapping_sub(1);
        y = y.wrapping_sub(1);
        b = sgr_b;
        sgr_type = ch;
        if sgr_type as i32 == 'm' as i32 {
            b = 3 as u_int;
        }
        if sgr_type as i32 == 'm' as i32
            && (sgr_b & 195 as u32 == 64 as u32
                || sgr_b & 195 as u32 == 65 as u32)
        {
            return -(2 as i32);
        }
    } else {
        return -(1 as i32);
    }
    (unsafe { (*m).lx = (*tty).mouse_last_x });
    (unsafe { (*m).x = x });
    (unsafe { (*m).ly = (*tty).mouse_last_y });
    (unsafe { (*m).y = y });
    (unsafe { (*m).lb = (*tty).mouse_last_b });
    (unsafe { (*m).b = b });
    (unsafe { (*m).sgr_type = sgr_type as u_int });
    (unsafe { (*m).sgr_b = sgr_b });
    (unsafe { (*tty).mouse_last_x = x });
    (unsafe { (*tty).mouse_last_y = y });
    (unsafe { (*tty).mouse_last_b = b });
    return 0;
}
extern "C" fn tty_keys_clipboard(
    mut tty: *mut tty,
    mut buf: *const i8,
    mut len: size_t,
    mut size: *mut size_t,
) -> i32 {
    let mut c: *mut client = unsafe { (*tty).client };
    let mut wp: *mut window_pane = std::ptr::null_mut::<window_pane>();
    let mut end: size_t = 0;
    let mut terminator: size_t = 0 as size_t;
    let mut needed: size_t = 0;
    let mut copy: *mut i8 = std::ptr::null_mut::<i8>();
    let mut out: *mut i8 = std::ptr::null_mut::<i8>();
    let mut outlen: i32 = 0;
    let mut i: u_int = 0;
    (unsafe { *size = 0 as size_t });
    if (unsafe { *buf.offset(0 as i32 as isize) }) as i32 != '\u{1b}' as i32 {
        return -(1 as i32);
    }
    if len == 1 as u64 {
        return 1;
    }
    if (unsafe { *buf.offset(1 as i32 as isize) }) as i32 != ']' as i32 {
        return -(1 as i32);
    }
    if len == 2 as u64 {
        return 1;
    }
    if (unsafe { *buf.offset(2 as i32 as isize) }) as i32 != '5' as i32 {
        return -(1 as i32);
    }
    if len == 3 as u64 {
        return 1;
    }
    if (unsafe { *buf.offset(3 as i32 as isize) }) as i32 != '2' as i32 {
        return -(1 as i32);
    }
    if len == 4 as u64 {
        return 1;
    }
    if (unsafe { *buf.offset(4 as i32 as isize) }) as i32 != ';' as i32 {
        return -(1 as i32);
    }
    if len == 5 as u64 {
        return 1;
    }
    end = 5 as size_t;
    while end < len {
        if (unsafe { *buf.offset(end as isize) }) as i32 == '\u{7}' as i32 {
            terminator = 1 as size_t;
            break;
        } else if end > 5 as u64
            && (unsafe { *buf.offset(end.wrapping_sub(1 as i32 as u64) as isize) }) as i32
                == '\u{1b}' as i32
            && (unsafe { *buf.offset(end as isize) }) as i32 == '\\' as i32
        {
            terminator = 2 as size_t;
            break;
        } else {
            end = end.wrapping_add(1);
        }
    }
    if end == len {
        return 1;
    }
    (unsafe { *size = end.wrapping_add(1 as i32 as u64) });
    buf = unsafe { buf.offset(5 as i32 as isize) };
    end = (end as u64).wrapping_sub(5 as i32 as u64) as size_t as size_t;
    end = (end as u64).wrapping_sub(terminator.wrapping_sub(1 as i32 as u64)) as size_t as size_t;
    while end != 0 as u64 && (unsafe { *buf }) as i32 != ';' as i32 {
        buf = unsafe { buf.offset(1) };
        end = end.wrapping_sub(1);
    }
    if end == 0 as u64 || end == 1 as u64 {
        return 0;
    }
    buf = unsafe { buf.offset(1) };
    end = end.wrapping_sub(1);
    if !(unsafe { (*tty).flags }) & 0x40 as i32 != 0 {
        return 0;
    }
    (unsafe { (*tty).flags &= !(0x40 as i32) });
    (unsafe { event_del(&mut (*tty).clipboard_timer) });
    copy = (unsafe { xmalloc(end.wrapping_add(1 as i32 as u64)) }) as *mut i8;
    (unsafe { memcpy(copy as *mut (), buf as *const (), end) });
    (unsafe { *copy.offset(end as isize) = '\0' as i32 as i8 });
    needed = end
        .wrapping_div(4 as i32 as u64)
        .wrapping_mul(3 as i32 as u64);
    out = (unsafe { xmalloc(needed) }) as *mut i8;
    outlen = unsafe { __b64_pton(copy, out as *mut u8, len) };
    if outlen == -(1 as i32) {
        (unsafe { free(out as *mut ()) });
        (unsafe { free(copy as *mut ()) });
        return 0;
    }
    (unsafe { free(copy as *mut ()) });
    (unsafe {
        log_debug(
            b"%s: %.*s\0" as *const u8 as *const i8,
            (*::core::mem::transmute::<&[u8; 19], &[i8; 19]>(b"tty_keys_clipboard\0")).as_ptr(),
            outlen,
            out,
        )
    });
    if (unsafe { (*c).flags }) as u64 & CLIENT_ACTIVEPANE0 as u64 != 0 {
        (unsafe { paste_add(std::ptr::null::<i8>(), out, outlen as size_t) });
        (unsafe { (*c).flags = ((*c).flags as u64 & !(CLIENT_ACTIVEPANE0 as u64)) as uint64_t });
    }
    i = 0 as u_int;
    while i < (unsafe { (*c).clipboard_npanes }) {
        wp = unsafe { window_pane_find_by_id(*((*c).clipboard_panes).offset(i as isize)) };
        if !wp.is_null() {
            (unsafe {
                input_reply_clipboard(
                    (*wp).event,
                    out,
                    outlen as size_t,
                    b"\x1B\\\0" as *const u8 as *const i8,
                )
            });
        }
        i = i.wrapping_add(1);
    }
    (unsafe { free((*c).clipboard_panes as *mut ()) });
    (unsafe { (*c).clipboard_panes = std::ptr::null_mut::<u_int>() });
    (unsafe { (*c).clipboard_npanes = 0 as u_int });
    return 0;
}
extern "C" fn tty_keys_device_attributes(
    mut tty: *mut tty,
    mut buf: *const i8,
    mut len: size_t,
    mut size: *mut size_t,
) -> i32 {
    let mut c: *mut client = unsafe { (*tty).client };
    let mut features: *mut i32 = unsafe { &mut (*c).term_features };
    let mut i: u_int = 0;
    let mut n: u_int = 0 as u_int;
    let mut tmp: [i8; 128] = [0; 128];
    let mut endptr: *mut i8 = std::ptr::null_mut::<i8>();
    let mut p: [i8; 32] = [ 0 as i8,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
    ];
    let mut cp: *mut i8 = std::ptr::null_mut::<i8>();
    let mut next: *mut i8 = std::ptr::null_mut::<i8>();
    (unsafe { *size = 0 as size_t });
    if (unsafe { (*tty).flags }) & 0x100 as i32 != 0 {
        return -(1 as i32);
    }
    if (unsafe { *buf.offset(0 as i32 as isize) }) as i32 != '\u{1b}' as i32 {
        return -(1 as i32);
    }
    if len == 1 as u64 {
        return 1;
    }
    if (unsafe { *buf.offset(1 as i32 as isize) }) as i32 != '[' as i32 {
        return -(1 as i32);
    }
    if len == 2 as u64 {
        return 1;
    }
    if (unsafe { *buf.offset(2 as i32 as isize) }) as i32 != '?' as i32 {
        return -(1 as i32);
    }
    if len == 3 as u64 {
        return 1;
    }
    i = 0 as u_int;
    while (i as u64) < ::core::mem::size_of::<[i8; 128]>() as u64 {
        if (3 as i32 as u32).wrapping_add(i) as u64 == len {
            return 1;
        }
        if (unsafe { *buf.offset((3 as i32 as u32).wrapping_add(i) as isize) }) as i32 == 'c' as i32
        {
            break;
        }
        tmp[i as usize] = unsafe { *buf.offset((3 as i32 as u32).wrapping_add(i) as isize) };
        i = i.wrapping_add(1);
    }
    if i as u64 == ::core::mem::size_of::<[i8; 128]>() as u64 {
        return -(1 as i32);
    }
    tmp[i as usize] = '\0' as i32 as i8;
    (unsafe { *size = (4 as i32 as u32).wrapping_add(i) as size_t });
    cp = tmp.as_mut_ptr();
    loop {
        next = unsafe { strsep(&mut cp, b";\0" as *const u8 as *const i8) };
        if next.is_null() {
            break;
        }
        p[n as usize] = (unsafe { strtoul(next, &mut endptr, 10) }) as i8;
        if (unsafe { *endptr }) as i32 != '\0' as i32 {
            p[n as usize] = 0 as i8;
        }
        n = n.wrapping_add(1);
        if n as u64
            == (::core::mem::size_of::<[i8; 32]>() as u64)
                .wrapping_div(::core::mem::size_of::<i8>() as u64)
        {
            break;
        }
    }
    let mut current_block_38: u64;
    match p[0 as i32 as usize] as i32 {
        62 => {
            current_block_38 = 7426508537109207738;
        }
        63 => {
            current_block_38 = 7426508537109207738;
        }
        64 => {
            current_block_38 = 5902788472386696215;
        }
        61 | 65 => {
            current_block_38 = 15840217163173984710;
        }
        _ => {
            current_block_38 = 8845338526596852646;
        }
    }
    match current_block_38 {
        7426508537109207738 => {
            current_block_38 = 5902788472386696215;
        }
        _ => {}
    }
    match current_block_38 {
        5902788472386696215 => {
            current_block_38 = 15840217163173984710;
        }
        _ => {}
    }
    match current_block_38 {
        15840217163173984710 => {
            i = 1 as u_int;
            while i < n {
                (unsafe {
                    log_debug(
                        b"%s: DA feature: %d\0" as *const u8 as *const i8,
                        (*c).name,
                        p[i as usize] as i32,
                    )
                });
                if p[i as usize] as i32 == 4 {
                    (unsafe {
                        tty_add_features(
                            features,
                            b"sixel\0" as *const u8 as *const i8,
                            b",\0" as *const u8 as *const i8,
                        )
                    });
                }
                if p[i as usize] as i32 == 21 {
                    (unsafe {
                        tty_add_features(
                            features,
                            b"margins\0" as *const u8 as *const i8,
                            b",\0" as *const u8 as *const i8,
                        )
                    });
                }
                if p[i as usize] as i32 == 28 {
                    (unsafe {
                        tty_add_features(
                            features,
                            b"rectfill\0" as *const u8 as *const i8,
                            b",\0" as *const u8 as *const i8,
                        )
                    });
                }
                i = i.wrapping_add(1);
            }
        }
        _ => {}
    }
    (unsafe {
        log_debug(
            b"%s: received primary DA %.*s\0" as *const u8 as *const i8,
            (*c).name,
            *size as i32,
            buf,
        )
    });
    (unsafe { tty_update_features(tty) });
    (unsafe { (*tty).flags |= 0x100 as i32 });
    return 0;
}
extern "C" fn tty_keys_device_attributes2(
    mut tty: *mut tty,
    mut buf: *const i8,
    mut len: size_t,
    mut size: *mut size_t,
) -> i32 {
    let mut c: *mut client = unsafe { (*tty).client };
    let mut features: *mut i32 = unsafe { &mut (*c).term_features };
    let mut i: u_int = 0;
    let mut n: u_int = 0 as u_int;
    let mut tmp: [i8; 128] = [0; 128];
    let mut endptr: *mut i8 = std::ptr::null_mut::<i8>();
    let mut p: [i8; 32] = [ 0 as i8,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
    ];
    let mut cp: *mut i8 = std::ptr::null_mut::<i8>();
    let mut next: *mut i8 = std::ptr::null_mut::<i8>();
    (unsafe { *size = 0 as size_t });
    if (unsafe { (*tty).flags }) & 0x800 as i32 != 0 {
        return -(1 as i32);
    }
    if (unsafe { *buf.offset(0 as i32 as isize) }) as i32 != '\u{1b}' as i32 {
        return -(1 as i32);
    }
    if len == 1 as u64 {
        return 1;
    }
    if (unsafe { *buf.offset(1 as i32 as isize) }) as i32 != '[' as i32 {
        return -(1 as i32);
    }
    if len == 2 as u64 {
        return 1;
    }
    if (unsafe { *buf.offset(2 as i32 as isize) }) as i32 != '>' as i32 {
        return -(1 as i32);
    }
    if len == 3 as u64 {
        return 1;
    }
    i = 0 as u_int;
    while (i as u64) < ::core::mem::size_of::<[i8; 128]>() as u64 {
        if (3 as i32 as u32).wrapping_add(i) as u64 == len {
            return 1;
        }
        if (unsafe { *buf.offset((3 as i32 as u32).wrapping_add(i) as isize) }) as i32 == 'c' as i32
        {
            break;
        }
        tmp[i as usize] = unsafe { *buf.offset((3 as i32 as u32).wrapping_add(i) as isize) };
        i = i.wrapping_add(1);
    }
    if i as u64 == ::core::mem::size_of::<[i8; 128]>() as u64 {
        return -(1 as i32);
    }
    tmp[i as usize] = '\0' as i32 as i8;
    (unsafe { *size = (4 as i32 as u32).wrapping_add(i) as size_t });
    cp = tmp.as_mut_ptr();
    loop {
        next = unsafe { strsep(&mut cp, b";\0" as *const u8 as *const i8) };
        if next.is_null() {
            break;
        }
        p[n as usize] = (unsafe { strtoul(next, &mut endptr, 10) }) as i8;
        if (unsafe { *endptr }) as i32 != '\0' as i32 {
            p[n as usize] = 0 as i8;
        }
        n = n.wrapping_add(1);
        if n as u64
            == (::core::mem::size_of::<[i8; 32]>() as u64)
                .wrapping_div(::core::mem::size_of::<i8>() as u64)
        {
            break;
        }
    }
    match p[0 as i32 as usize] as i32 {
        77 => {
            (unsafe {
                tty_default_features(
                    features,
                    b"mintty\0" as *const u8 as *const i8, 0 as u_int,
                )
            });
        }
        84 => {
            (unsafe {
                tty_default_features(
                    features,
                    b"tmux\0" as *const u8 as *const i8, 0 as u_int,
                )
            });
        }
        85 => {
            (unsafe {
                tty_default_features(
                    features,
                    b"rxvt-unicode\0" as *const u8 as *const i8, 0 as u_int,
                )
            });
        }
        _ => {}
    }
    (unsafe {
        log_debug(
            b"%s: received secondary DA %.*s\0" as *const u8 as *const i8,
            (*c).name,
            *size as i32,
            buf,
        )
    });
    (unsafe { tty_update_features(tty) });
    (unsafe { (*tty).flags |= 0x800 as i32 });
    return 0;
}
extern "C" fn tty_keys_extended_device_attributes(
    mut tty: *mut tty,
    mut buf: *const i8,
    mut len: size_t,
    mut size: *mut size_t,
) -> i32 {
    let mut c: *mut client = unsafe { (*tty).client };
    let mut features: *mut i32 = unsafe { &mut (*c).term_features };
    let mut i: u_int = 0;
    let mut tmp: [i8; 128] = [0; 128];
    (unsafe { *size = 0 as size_t });
    if (unsafe { (*tty).flags }) & 0x200 as i32 != 0 {
        return -(1 as i32);
    }
    if (unsafe { *buf.offset(0 as i32 as isize) }) as i32 != '\u{1b}' as i32 {
        return -(1 as i32);
    }
    if len == 1 as u64 {
        return 1;
    }
    if (unsafe { *buf.offset(1 as i32 as isize) }) as i32 != 'P' as i32 {
        return -(1 as i32);
    }
    if len == 2 as u64 {
        return 1;
    }
    if (unsafe { *buf.offset(2 as i32 as isize) }) as i32 != '>' as i32 {
        return -(1 as i32);
    }
    if len == 3 as u64 {
        return 1;
    }
    if (unsafe { *buf.offset(3 as i32 as isize) }) as i32 != '|' as i32 {
        return -(1 as i32);
    }
    if len == 4 as u64 {
        return 1;
    }
    i = 0 as u_int;
    while (i as u64) < (::core::mem::size_of::<[i8; 128]>() as u64).wrapping_sub(1 as i32 as u64) {
        if (4 as i32 as u32).wrapping_add(i) as u64 == len {
            return 1;
        }
        if (unsafe {
            *buf.offset(
                (4 as i32 as u32)
                    .wrapping_add(i)
                    .wrapping_sub(1 as i32 as u32) as isize,
            )
        }) as i32
            == '\u{1b}' as i32
            && (unsafe { *buf.offset((4 as i32 as u32).wrapping_add(i) as isize) }) as i32
                == '\\' as i32
        {
            break;
        }
        tmp[i as usize] = unsafe { *buf.offset((4 as i32 as u32).wrapping_add(i) as isize) };
        i = i.wrapping_add(1);
    }
    if i as u64 == (::core::mem::size_of::<[i8; 128]>() as u64).wrapping_sub(1 as i32 as u64) {
        return -(1 as i32);
    }
    tmp[i.wrapping_sub(1 as i32 as u32) as usize] = '\0' as i32 as i8;
    (unsafe { *size = (5 as i32 as u32).wrapping_add(i) as size_t });
    if (unsafe {
        strncmp(
            tmp.as_mut_ptr(),
            b"iTerm2 \0" as *const u8 as *const i8, 7 as u64,
        )
    }) == 0
    {
        (unsafe {
            tty_default_features(
                features,
                b"iTerm2\0" as *const u8 as *const i8, 0 as u_int,
            )
        });
    } else if (unsafe {
        strncmp(
            tmp.as_mut_ptr(),
            b"tmux \0" as *const u8 as *const i8, 5 as u64,
        )
    }) == 0
    {
        (unsafe {
            tty_default_features(
                features,
                b"tmux\0" as *const u8 as *const i8, 0 as u_int,
            )
        });
    } else if (unsafe {
        strncmp(
            tmp.as_mut_ptr(),
            b"XTerm(\0" as *const u8 as *const i8, 6 as u64,
        )
    }) == 0
    {
        (unsafe {
            tty_default_features(
                features,
                b"XTerm\0" as *const u8 as *const i8, 0 as u_int,
            )
        });
    } else if (unsafe {
        strncmp(
            tmp.as_mut_ptr(),
            b"mintty \0" as *const u8 as *const i8, 7 as u64,
        )
    }) == 0
    {
        (unsafe {
            tty_default_features(
                features,
                b"mintty\0" as *const u8 as *const i8, 0 as u_int,
            )
        });
    }
    (unsafe {
        log_debug(
            b"%s: received extended DA %.*s\0" as *const u8 as *const i8,
            (*c).name,
            *size as i32,
            buf,
        )
    });
    (unsafe { free((*c).term_type as *mut ()) });
    (unsafe { (*c).term_type = xstrdup(tmp.as_mut_ptr()) });
    (unsafe { tty_update_features(tty) });
    (unsafe { (*tty).flags |= 0x200 as i32 });
    return 0;
}
#[no_mangle]
pub extern "C" fn tty_keys_colours(
    mut tty: *mut tty,
    mut buf: *const i8,
    mut len: size_t,
    mut size: *mut size_t,
    mut fg: *mut i32,
    mut bg: *mut i32,
) -> i32 {
    let mut c: *mut client = unsafe { (*tty).client };
    let mut i: u_int = 0;
    let mut tmp: [i8; 128] = [0; 128];
    let mut n: i32 = 0;
    (unsafe { *size = 0 as size_t });
    if (unsafe { *buf.offset(0 as i32 as isize) }) as i32 != '\u{1b}' as i32 {
        return -(1 as i32);
    }
    if len == 1 as u64 {
        return 1;
    }
    if (unsafe { *buf.offset(1 as i32 as isize) }) as i32 != ']' as i32 {
        return -(1 as i32);
    }
    if len == 2 as u64 {
        return 1;
    }
    if (unsafe { *buf.offset(2 as i32 as isize) }) as i32 != '1' as i32 {
        return -(1 as i32);
    }
    if len == 3 as u64 {
        return 1;
    }
    if (unsafe { *buf.offset(3 as i32 as isize) }) as i32 != '0' as i32
        && (unsafe { *buf.offset(3 as i32 as isize) }) as i32 != '1' as i32
    {
        return -(1 as i32);
    }
    if len == 4 as u64 {
        return 1;
    }
    if (unsafe { *buf.offset(4 as i32 as isize) }) as i32 != ';' as i32 {
        return -(1 as i32);
    }
    if len == 5 as u64 {
        return 1;
    }
    i = 0 as u_int;
    while (i as u64) < (::core::mem::size_of::<[i8; 128]>() as u64).wrapping_sub(1 as i32 as u64) {
        if (5 as i32 as u32).wrapping_add(i) as u64 == len {
            return 1;
        }
        if (unsafe {
            *buf.offset(
                (5 as i32 as u32)
                    .wrapping_add(i)
                    .wrapping_sub(1 as i32 as u32) as isize,
            )
        }) as i32
            == '\u{1b}' as i32
            && (unsafe { *buf.offset((5 as i32 as u32).wrapping_add(i) as isize) }) as i32
                == '\\' as i32
        {
            break;
        }
        if (unsafe { *buf.offset((5 as i32 as u32).wrapping_add(i) as isize) }) as i32
            == '\u{7}' as i32
        {
            break;
        }
        tmp[i as usize] = unsafe { *buf.offset((5 as i32 as u32).wrapping_add(i) as isize) };
        i = i.wrapping_add(1);
    }
    if i as u64 == (::core::mem::size_of::<[i8; 128]>() as u64).wrapping_sub(1 as i32 as u64) {
        return -(1 as i32);
    }
    if tmp[i.wrapping_sub(1 as i32 as u32) as usize] as i32 == '\u{1b}' as i32 {
        tmp[i.wrapping_sub(1 as i32 as u32) as usize] = '\0' as i32 as i8;
    } else {
        tmp[i as usize] = '\0' as i32 as i8;
    }
    (unsafe { *size = (6 as i32 as u32).wrapping_add(i) as size_t });
    n = unsafe { colour_parseX11(tmp.as_mut_ptr()) };
    if n != -(1 as i32) && (unsafe { *buf.offset(3 as i32 as isize) }) as i32 == '0' as i32 {
        if !c.is_null() {
            (unsafe {
                log_debug(
                    b"%s fg is %s\0" as *const u8 as *const i8,
                    (*c).name,
                    colour_tostring(n),
                )
            });
        } else {
            (unsafe { log_debug(b"fg is %s\0" as *const u8 as *const i8, colour_tostring(n)) });
        }
        (unsafe { *fg = n });
    } else if n != -(1 as i32) {
        if !c.is_null() {
            (unsafe {
                log_debug(
                    b"%s bg is %s\0" as *const u8 as *const i8,
                    (*c).name,
                    colour_tostring(n),
                )
            });
        } else {
            (unsafe { log_debug(b"bg is %s\0" as *const u8 as *const i8, colour_tostring(n)) });
        }
        (unsafe { *bg = n });
    }
    return 0;
}
